http://llvm.org/bugs/show_bug.cgi?id=20668

            Bug ID: 20668
           Summary: cmake build of compiler-rt on Mac fails when LDFLAGS
                    are set
           Product: compiler-rt
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

We're trying to switch to using CMake for Chromium's Clang build. We do
bootstrap builds: first we build clang and libc++, then we use those to build
Clang again.

Steps to reproduce:

$ LDFLAGS="-L/work/llvm/build.release/lib" cmake -GNinja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_COMPILER=/work/llvm/build.release/bin/clang
-DCMAKE_CXX_COMPILER=/work/llvm/build.release/bin/clang++
-DCMAKE_CXX_FLAGS="-stdlib=libc++ -nostdinc++
-I/work/llvm/projects/libcxx/include" $LLVM_SRC_DIR
$ ninja

...

ld: building for iOS Simulator, but linking against dylib built for MacOSX file
'/work/llvm/build.release/lib/libc++.dylib' for architecture x86_64


The problem is that our LDFLAGS end up in the link lines also for the
cross-compiled runtimes, e.g. for iossim or i386.

We'll work around this by building compiler-rt in a separate tree and not
setting LDFLAGS, but it's not ideal.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to