diff options
author | Petr Hosek <phosek@google.com> | 2021-12-07 11:53:38 -0800 |
---|---|---|
committer | Petr Hosek <phosek@google.com> | 2022-01-05 11:46:30 -0800 |
commit | 96e36048fddf7f9ce3e59c117fdd4d307f9165c5 (patch) | |
tree | 9e7625b2aa64f060cd9e5613251515f67a9c73bc /cmake | |
parent | fffd663c871d91c431bb3f0ccda48567f0d9aca5 (diff) | |
download | llvm-96e36048fddf7f9ce3e59c117fdd4d307f9165c5.tar.gz |
[CMake] Move the AIX archiver settings to a module
This allows their reuse across projects. The name of the module
is intentionally generic because we would like to move more platform
checks there.
Differential Revision: https://reviews.llvm.org/D115276
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/SetPlatformToolchainTools.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/Modules/SetPlatformToolchainTools.cmake b/cmake/Modules/SetPlatformToolchainTools.cmake new file mode 100644 index 000000000000..ab2abe934473 --- /dev/null +++ b/cmake/Modules/SetPlatformToolchainTools.cmake @@ -0,0 +1,9 @@ +get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES) + +if(CMAKE_SYSTEM_NAME MATCHES "AIX") + foreach(lang IN LISTS languages) + set(CMAKE_${lang}_ARCHIVE_CREATE "<CMAKE_AR> -X32_64 qc <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_${lang}_ARCHIVE_APPEND "<CMAKE_AR> -X32_64 q <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_${lang}_ARCHIVE_FINISH "<CMAKE_RANLIB> -X32_64 <TARGET>") + endforeach() +endif() |