https://llvm.org/bugs/show_bug.cgi?id=23691

            Bug ID: 23691
           Summary: clang ignores --sys-root when looking for libc++
                    headers
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

When trying to cross-compile a C++ application using libc++, clang includes
libc++ headers from the system instead of the target sysroot.

For example, trying to cross-compile something that does "#include <string>"
with

clang -target x86_64-openmandriva-linux-musl -std=c++11 -stdlib=libc++ test.cpp
--sysroot=/usr/x86_64-openmandriva-linux-musl/sys-root -lc++ -lc++abi

will include
/usr/bin/../include/c++/v1/string

even if /usr/x86_64-openmandriva-linux-musl/usr/include/c++/v1/string exists.

-- 
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