[llvm-bugs] [Bug 49294] New: error: unknown argument: '-m32 -DLIBCXX_BUILDING_LIBCXXABI' when building 32-bit libc++ on x86_64/Linux
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Feb 19 21:29:01 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49294
Bug ID: 49294
Summary: error: unknown argument: '-m32
-DLIBCXX_BUILDING_LIBCXXABI' when building 32-bit
libc++ on x86_64/Linux
Product: libc++
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: manojgupta at google.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
I am seeing a bunch of error: unknown argument: '-m32
-DLIBCXX_BUILDING_LIBCXXABI' when building 32-bit libc++ on x86_64/Linux.
Repro steps:
1. Build clang and compiler-rt builtins
$ cd /path/to/llvm-project
$ mkdir ../build && cd ../build
$ cmake ../llvm-project/llvm
-DLLVM_ENABLE_PROJECTS="llvm;clang;lld;compiler-rt"
$ ninja clang builtins
$
2. Try to build 32-bit libc++ as standalone library
(We are in llvm-project/../build directory)
$ mkdir libcxx_build && cd libcxx_build
$ cmake -GNinja ../../llvm-project/libcxx "-DLLVM_USE_LINKER=lld"
-DCMAKE_C_COMPILER=/path/to/build/bin/clang
-DCMAKE_CXX_COMPILER=/path/to/build/bin/clang++ -DCMAKE_BUILD_TYPE=Release
"-DLIBCXX_USE_COMPILER_RT=ON" "-DLIBCXX_BUILD_32_BITS=ON"
"-DLIBCXX_CXX_ABI=libcxxabi"
"-DLIBCXX_CXX_ABI_INCLUDE_PATHS=../../llvm-project/libcxxabi/include"
I see following messages in the logs that look surprising. Seems like somewhere
"-m32" and "-DLIBCXX_BUILDING_LIBCXXABI" were combined as a single compiler
option which is causing clang to reject the option.
clang-12: error: unknown argument: '-m32 -DLIBCXX_BUILDING_LIBCXXABI'
-- Failed to find compiler-rt library
clang-12: error: unknown argument: '-m32 -DLIBCXX_BUILDING_LIBCXXABI'
-- Failed to find compiler-rt library
clang-12: error: unknown argument: '-m32 -DLIBCXX_BUILDING_LIBCXXABI'
-- Failed to find compiler-rt library
This does not cause any build breakage but I believe there is some incorrect
compiler flag handling somewhere.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210220/1983c0df/attachment.html>
More information about the llvm-bugs
mailing list