From 6ab81c32be6c90a146b7b1a27c9ca248c44bc491 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 6 Jan 2021 18:55:01 -0500 Subject: [PATCH] CMake: set CMAKE_SKIP_RPATH everywhere Else, there's tons of "-- Set runtime path of" spam at build time, with apparently no way of disabling the build noise other than turning of rpaths. If the dynamic loader uses them at some point, we probably want to set them through cflags/ldflags instead of through cmake's built-in thing anyways, for that reason. --- CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c28fc51a6..7aa777ee20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,12 +119,9 @@ set(CMAKE_SHARED_LIBRARY_SUFFIX ".so") set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,--hash-style=gnu") set(CMAKE_CXX_LINK_FLAGS "-Wl,--hash-style=gnu") -# Note: MacOS has different rpath rules from linux. -# We disable it completely for MacOS hosts to avoid having to track down all the individual flags to unset +# We disable it completely because it makes cmake very spammy. # This will need to be revisited when the Loader supports RPATH/RUN_PATH. -if (CMAKE_SYSTEM_NAME MATCHES Darwin) - set(CMAKE_SKIP_RPATH TRUE) -endif() +set(CMAKE_SKIP_RPATH TRUE) add_compile_options(-Os -g1 -fno-exceptions -fstack-protector-strong -Wno-address-of-packed-member -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -Wno-nonnull-compare -Wno-deprecated-copy -Wno-expansion-to-defined) add_compile_options(-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.)