I have a mixed objective-c/swift 4 project that includes a number of targets, some of which are command-line executables. I wanted to take the Xcode 9.2 Preview Build system for a spin, so I changed my Project Settings to use the llbuild build system. However, in doing so, the build now fails because it isn't able to find `<os/os.log>`
For example, in an objective-c target that is a command-line tool imports:
#import <Foundation/Foundation.h>
#import <os/log.h>and the new preview builder fails as follows:
CompileC /Users/blacey/Projects/SuperDuper/build/SuperDuper.build/Debug/SDCopy.build/Objects-normal/x86_64/SDCopy.o /Users/blacey/Projects/SuperDuper/SDCopy.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/blacey/Projects/SuperDuper
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fmodules -gmodules -fmodules-cache-path=/Users/blacey/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/blacey/Library/Developer/Xcode/DerivedData/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -fmodule-name=SDCopy -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wno-missing-braces -Wno-parentheses -Wswitch -Wunused-function -Wunused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.10 -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -index-store-path /Users/blacey/Library/Developer/Xcode/DerivedData/SuperDuper-ejkydobhufehgdcsgytvoocesetb/Index/DataStore -iquote /Users/blacey/Projects/SuperDuper/build/SuperDuper.build/Debug/SDCopy.build/SDCopy-generated-files.hmap -I/Users/blacey/Projects/SuperDuper/build/SuperDuper.build/Debug/SDCopy.build/SDCopy-own-target-headers.hmap -I/Users/blacey/Projects/SuperDuper/build/SuperDuper.build/Debug/SDCopy.build/SDCopy-all-non-framework-target-headers.hmap -ivfsoverlay /Users/blacey/Projects/SuperDuper/build/SuperDuper.build/Debug/SDCopy.build/all-product-headers.yaml -iquote /Users/blacey/Projects/SuperDuper/build/SuperDuper.build/Debug/SDCopy.build/SDCopy-project-headers.hmap -I/Users/blacey/Projects/SuperDuper/build/Debug/include -I/Users/blacey/Projects/SuperDuper/build/SuperDuper.build/Debug/SDCopy.build/DerivedSources/x86_64 -I/Users/blacey/Projects/SuperDuper/build/SuperDuper.build/Debug/SDCopy.build/DerivedSources -Wno-deprecated-declarations -F/Users/blacey/Projects/SuperDuper/build/Debug -include /Users/blacey/Projects/SuperDuper/build/SharedPrecompiledHeaders/SharedPrecompiledHeaders/9111473358179013213/SDCopy_Prefix.pch -MMD -MT dependencies -MF /Users/blacey/Projects/SuperDuper/build/SuperDuper.build/Debug/SDCopy.build/Objects-normal/x86_64/SDCopy.d --serialize-diagnostics /Users/blacey/Projects/SuperDuper/build/SuperDuper.build/Debug/SDCopy.build/Objects-normal/x86_64/SDCopy.dia -c /Users/blacey/Projects/SuperDuper/SDCopy.m -o /Users/blacey/Projects/SuperDuper/build/SuperDuper.build/Debug/SDCopy.build/Objects-normal/x86_64/SDCopy.o
In file included from /Users/blacey/Projects/SuperDuper/SDCopy.m:6:
/Users/blacey/Projects/SuperDuper/CloneController.h:10:9: fatal error: 'os/log.h' file not found
#import <os/log.h>
^~~~~~~~~~
1 error generated.The SDK is set to "lastest" and I am running Xcode 9.2 on High Sierra 10.13.4 beta 1. The deployment target is set to macOS 10.10.
The legacy builder works because it correctly sets SDKROOT to the base SDK, not the deployment target SDK.
Could this a problem with my project configuration? According to the Xcode release notes, the new builder "finds" issues with project configurations. If not, does anyone know of a way to work around this problem?