Closed Quuxplusone closed 9 years ago
Bugzilla Link | PR25459 |
Status | RESOLVED WONTFIX |
Importance | P normal |
Reported by | Nico Weber (nicolasweber@gmx.de) |
Reported on | 2015-11-09 12:37:12 -0800 |
Last modified on | 2015-11-09 13:52:50 -0800 |
Version | unspecified |
Hardware | PC All |
CC | chris.bieneman@gmail.com, chris.bieneman@me.com, llvm-bugs@lists.llvm.org |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
Or 244948 – it only sets DARWIN_osx_ARCHS if MACOSX_VERSION_MIN_FLAG isn't defined which looks wrong.
(I'm guessing this bug only happens with MACOSX_VERSION_MIN_FLAG set)
Yea... Don't set that. We should really make building with the version min flag a hard error. If you really want to set the version min you should be setting SANITIZER_MIN_OSX_VERSION.
Oh, that revision is old enough that our previous build has it, so that's not it. We are setting SANITIZER_MIN_OSX_VERSION, not MACOSX_VERSION_MIN_FLAG, I got confused by the similar name of the two flags.
Happens without -DSANITIZER_MIN_OSX_VERSION too. If I add this debug output:
Index: cmake/Modules/CompilerRTDarwinUtils.cmake
===================================================================
--- cmake/Modules/CompilerRTDarwinUtils.cmake (revision 247874)
+++ cmake/Modules/CompilerRTDarwinUtils.cmake (working copy)
@@ -71,6 +71,7 @@
COMPILE_DEFINITIONS "-v -arch ${arch}" ${DARWIN_${os}_CFLAGS}
CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${arch_linker_flags}"
OUTPUT_VARIABLE TEST_OUTPUT)
+ message(${TEST_OUTPUT})
if(${CAN_TARGET_${os}_${arch}})
list(APPEND working_archs ${arch})
then the error messages look like
Run Build Command:"/Users/thakis/src/depot_tools/ninja"
"cmTryCompileExec9199632"
[1/2] Building CXX object CMakeFiles/cmTryCompileExec9199632.dir/src.cpp.o
FAILED: /Users/thakis/src/chromefetch/src/third_party/llvm-
build/Release+Asserts/bin/clang++ -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
-v -arch armv6 -stdlib=libc++ -mmacosx-version-min=10.9 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
-o CMakeFiles/cmTryCompileExec9199632.dir/src.cpp.o -c
/Users/thakis/src/chromefetch/src/crttest/compiler-rt-build/CMakeFiles/src.cpp
clang version 3.8.0 (trunk 252468)
Target: arm-apple-darwin14.5.0
Thread model: posix
InstalledDir: /Users/thakis/src/chromefetch/src/third_party/llvm-
build/Release+Asserts/bin
"/Volumes/MacintoshHD2/src/chromefetch/src/third_party/llvm-build/Release+Asserts/bin/clang-3.8" -cc1 -triple armv6k-apple-macosx10.9.0 -emit-obj -mrelax-all -disable-free -main-file-name src.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -target-cpu arm1176jzf-s -target-feature +soft-float-abi -target-abi apcs-gnu -mfloat-abi soft -target-linker-version 253.3 -v -dwarf-column-info -coverage-file /Volumes/MacintoshHD2/src/chromefetch/src/crttest/compiler-rt-build/CMakeFiles/CMakeTmp/CMakeFiles/cmTryCompileExec9199632.dir/src.cpp.o -resource-dir /Volumes/MacintoshHD2/src/chromefetch/src/third_party/llvm-build/Release+Asserts/bin/../lib/clang/3.8.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -stdlib=libc++ -fdeprecated-macro -fdebug-compilation-dir /Volumes/MacintoshHD2/src/chromefetch/src/crttest/compiler-rt-build/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -fallow-half-arguments-and-returns -fblocks -fobjc-runtime=macosx-10.9.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fsjlj-exceptions -fmax-type-align=16 -fdiagnostics-show-option -o CMakeFiles/cmTryCompileExec9199632.dir/src.cpp.o -x c++ /Users/thakis/src/chromefetch/src/crttest/compiler-rt-build/CMakeFiles/src.cpp
clang -cc1 version 3.8.0 based upon LLVM 3.8.0svn default target x86_64-apple-
darwin14.5.0
ignoring nonexistent directory
"/Volumes/MacintoshHD2/src/chromefetch/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1"
ignoring nonexistent directory
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/v1"
ignoring nonexistent directory
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/local/include"
ignoring nonexistent directory
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/Volumes/MacintoshHD2/src/chromefetch/src/third_party/llvm-build/Release+Asserts/bin/../lib/clang/3.8.0/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks (framework directory)
End of search list.
/Users/thakis/src/chromefetch/src/crttest/compiler-rt-
build/CMakeFiles/src.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
^
1 error generated.
ninja: build stopped: subcommand failed.
The bin/clang we use isn't in an installed directory -- we run install later
and copy over libc++ headers into the package we build, but it's not around yet
when we build compiler_rt.
This used to work, let me check if we changed out scripts (likely, as the
<iostream> check in compiler-rt's CMakeFiles isn't very new). Might just be
user error.
Aha, we used to use system clang for building compiler_rt, but you told us to not do this, so now we're using the just-build clang (http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151005/303674.html). That's what's causing this.
...looks like Xcode 7's clang can build compiler-rt again, so we can switch back to system clang.
(why don't we build libcxx as part of the clang build, so that the headers exist? Because the libcxx tests don't pass in bootstrap builds, see bug 24068.