Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AIX][cmake] Adjust management of
-G
for linking
The change in 0ba9843 changed the behaviour of the build when using an XL build compiler because `-G` is not a pure linker option: it also implies `-shared`. This was accounted for in the base CMake configuration, so an analysis of the change from 0ba9843 in relation to a build using Clang (where `-shared` is introduced by CMake) would not identify the issue. This patch resolves this particular issue by adding `-shared` alongside `-Wl,-G`. At the same time, the investigation reveals that several aspects of the various build configurations are not operating in the manner originally intended. The other issue related to the `-G` linker option in the build is that the removal of it (to avoid unnecessary use of run-time linking) is not effective for the build using the Clang compiler. This patch addresses this by adjusting the regular expressions used to remove the broadly- applied `-G`. Finally, the issue of specifying the export list with `-Wl,` instead of a compiler option is flagged with a FIXME comment. Reviewed By: daltenty, amyk Differential Revision: https://reviews.llvm.org/D90041
- Loading branch information