Accepting request 972707 from devel:tools:compiler

- Don't override default linker flags. (We were losing -Wl,-z,now.)

OBS-URL: https://build.opensuse.org/request/show/972707
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm13?expand=0&rev=10
This commit is contained in:
Dominique Leuenberger 2022-04-28 21:06:52 +00:00 committed by Git OBS Bridge
commit ceae715f08
2 changed files with 8 additions and 9 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Apr 24 20:52:29 UTC 2022 - Aaron Puchert <aaronpuchert@alice-dsl.net>
- Don't override default linker flags. (We were losing -Wl,-z,now.)
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Apr 3 13:42:27 UTC 2022 - Aaron Puchert <aaronpuchert@alice-dsl.net> Sun Apr 3 13:42:27 UTC 2022 - Aaron Puchert <aaronpuchert@alice-dsl.net>

View File

@ -727,7 +727,7 @@ avail_mem=$(awk '/MemAvailable/ { print $2 }' /proc/meminfo)
%define __builder ninja %define __builder ninja
%define __builddir stage1 %define __builddir stage1
# -z,now is breaking now, it needs to be fixed %define build_ldflags -Wl,--no-keep-memory
%cmake \ %cmake \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS:BOOL=OFF \ -DBUILD_SHARED_LIBS:BOOL=OFF \
@ -750,10 +750,7 @@ avail_mem=$(awk '/MemAvailable/ { print $2 }' /proc/meminfo)
-DCLANG_ENABLE_STATIC_ANALYZER:BOOL=OFF \ -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=OFF \
-DCOMPILER_RT_BUILD_SANITIZERS:BOOL=OFF \ -DCOMPILER_RT_BUILD_SANITIZERS:BOOL=OFF \
-DCOMPILER_RT_BUILD_XRAY:BOOL=OFF \ -DCOMPILER_RT_BUILD_XRAY:BOOL=OFF \
-DLLDB_DISABLE_PYTHON=ON \ -DLLDB_DISABLE_PYTHON=ON
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-keep-memory" \
-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-keep-memory" \
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-keep-memory"
ninja -v %{?_smp_mflags} clang llvm-tblgen clang-tblgen \ ninja -v %{?_smp_mflags} clang llvm-tblgen clang-tblgen \
%if %{with thin_lto} %if %{with thin_lto}
llvm-ar llvm-ranlib \ llvm-ar llvm-ranlib \
@ -794,6 +791,7 @@ max_link_jobs=1
%endif %endif
%define __builddir build %define __builddir build
%define build_ldflags -Wl,--build-id=sha1
export PATH=${PWD}/stage1/bin:$PATH export PATH=${PWD}/stage1/bin:$PATH
export CC=${PWD}/stage1/bin/clang export CC=${PWD}/stage1/bin/clang
export CXX=${PWD}/stage1/bin/clang++ export CXX=${PWD}/stage1/bin/clang++
@ -809,7 +807,6 @@ export CLANG_TOOLS_EXTRA_DIR=${PWD}/tools/clang/tools/extra
# The build occasionally uses tools linking against previously built # The build occasionally uses tools linking against previously built
# libraries (mostly libLLVM.so), but we don't want to set RUNPATHs. # libraries (mostly libLLVM.so), but we don't want to set RUNPATHs.
export LD_LIBRARY_PATH=${PWD}/build/%{_lib} export LD_LIBRARY_PATH=${PWD}/build/%{_lib}
# -z,now is breaking now, it needs to be fixed
%cmake \ %cmake \
-DBUILD_SHARED_LIBS:BOOL=OFF \ -DBUILD_SHARED_LIBS:BOOL=OFF \
-DLLVM_HOST_TRIPLE=%{host_triple} \ -DLLVM_HOST_TRIPLE=%{host_triple} \
@ -865,9 +862,6 @@ export LD_LIBRARY_PATH=${PWD}/build/%{_lib}
-DLLDB_DISABLE_PYTHON=ON \ -DLLDB_DISABLE_PYTHON=ON \
%endif %endif
-DCMAKE_SKIP_RPATH:BOOL=ON \ -DCMAKE_SKIP_RPATH:BOOL=ON \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--build-id=sha1" \
-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,--build-id=sha1" \
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--build-id=sha1" \
-DLLVM_POLLY_LINK_INTO_TOOLS=OFF \ -DLLVM_POLLY_LINK_INTO_TOOLS=OFF \
-DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=${CLANG_TOOLS_EXTRA_DIR} \ -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=${CLANG_TOOLS_EXTRA_DIR} \
-DPOLLY_BUNDLED_ISL:BOOL=ON -DPOLLY_BUNDLED_ISL:BOOL=ON