Problem with clean Xcode builds on new stable branches?

As a stopgap solution, I've been working off an older tag (git checkout blah && utils/update-checkout --tag blah), swift-DEVELOPMENT-SNAPSHOT-2019-08-25-a to be precise. Not ideal, but avoids being blocked.

I have this local hack that avoids the problem:

    diff --git a/tools/clang-shlib/CMakeLists.txt b/tools/clang-shlib/CMakeLists.txt
index bc34fa10d1..415b63eb59 100644
--- a/tools/clang-shlib/CMakeLists.txt
+++ b/tools/clang-shlib/CMakeLists.txt
@@ -3,6 +3,10 @@ if (NOT LLVM_ENABLE_PIC)
   return()
 endif()
 
+if (XCODE)
+  return()
+endif()
+
 get_property(clang_libs GLOBAL PROPERTY CLANG_STATIC_LIBS)
 
 foreach (lib ${clang_libs})

I don't know what the correct fix is, but perhaps we should commit this just to unblock people.

Doug

I have a fix for a separate issue around ClangdXPC.framework, ⚙ D68846 Do the bare minimum to get ClangdXPC.framework building with CMake's Xcode generator. But I haven't reproduced the filelist problem on my own machine yet. (Admittedly I do not have the Command-Line Tools installed, just Xcode 11.)

The other change should be in, though you will need to reconfigure your LLVM build directory to pick it up. A fairly surgical way to do that is to delete the CMakeCache.txt out of it and run build-script again.

1 Like

Thank you @jrose @typesanitizer @Douglas_Gregor

@jrose After applying the local hack changes that @Douglas_Gregor mentioned, end up hitting that issue with ClangXPC.framework, will just add your changes ⚙ D68846 Do the bare minimum to get ClangdXPC.framework building with CMake's Xcode generator. Let's see if it works now :))

Edit: Got it working now \o/, with @Douglas_Gregor changes and ⚙ D68846 Do the bare minimum to get ClangdXPC.framework building with CMake's Xcode generator

1 Like

And you're sure you have my changes from [CMake] Clang: Don't use object libraries with Xcode by jrose-apple · Pull Request #363 · apple/swift-clang · GitHub too?

@jrose yeah, just checked got them too :)

*grumble* Still confused, then. What's different about your clang-shlib to mine?

Not sure :sweat_smile: besides the hack, I think there's none...

More info about the environment I'm in
Using cmake 3.15.4, Xcode 11.1(11A1027), Command line tools updated I think ...,
Also, always running clean builds.
Let me know if there is more info I can provide to help find the issue :)

1 Like