Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc++abi] Use target_compile_options to pass LIBCXXABI_ADDITIONAL_COMPILE_FLAGS #96112

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion libcxxabi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "AIX")
add_flags_if_supported("-mdefault-visibility-export-mapping=explicit")
set(CMAKE_AIX_EXPORT_ALL_SYMBOLS OFF)
endif()
add_compile_flags("${LIBCXXABI_ADDITIONAL_COMPILE_FLAGS}")
add_library_flags("${LIBCXXABI_ADDITIONAL_LIBRARIES}")

# Configure compiler. Must happen after setting the target flags.
Expand Down
2 changes: 2 additions & 0 deletions libcxxabi/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ set_target_properties(cxxabi_shared_objects
if (CMAKE_POSITION_INDEPENDENT_CODE OR NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
set_target_properties(cxxabi_shared_objects PROPERTIES POSITION_INDEPENDENT_CODE ON) # must set manually because it's an object library
endif()
target_compile_options(cxxabi_shared_objects PUBLIC "${LIBCXXABI_ADDITIONAL_COMPILE_FLAGS}")

if (LIBCXXABI_ENABLE_SHARED)
add_library(cxxabi_shared SHARED)
Expand Down Expand Up @@ -261,6 +262,7 @@ set_target_properties(cxxabi_static_objects
CXX_STANDARD_REQUIRED OFF # TODO: Make this REQUIRED once we don't need to accommodate the LLVM documentation builders using an ancient CMake
COMPILE_FLAGS "${LIBCXXABI_COMPILE_FLAGS}"
)
target_compile_options(cxxabi_static_objects PUBLIC "${LIBCXXABI_ADDITIONAL_COMPILE_FLAGS}")

if(LIBCXXABI_HERMETIC_STATIC_LIBRARY)
target_add_compile_flags_if_supported(cxxabi_static_objects PRIVATE -fvisibility=hidden)
Expand Down
Loading