[PATCH] D83866: [SystemZ/ZOS] Additions to the build system.

Kai Nacke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 05:51:44 PDT 2020


Kai added inline comments.


================
Comment at: llvm/cmake/modules/AddLLVM.cmake:252
       elseif(NOT WIN32 AND NOT LLVM_LINKER_IS_GOLD AND
-             NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD|AIX")
+             NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD|AIX|OS390")
         # Object files are compiled with -ffunction-data-sections.
----------------
hubert.reinterpretcast wrote:
> hubert.reinterpretcast wrote:
> > The various "strip" binder options are not the default, so there is a TODO here to enable the removal of the unneeded portions of the input to the linking process (which should help in terms of binary size).
> @Kai, can we at least add a TODO comment to set up linker garbage collection for a z/OS toolchain?
For sure.


================
Comment at: llvm/cmake/modules/GetHostTriple.cmake:19
+    set( value "s390x-ibm-zos" )
   elseif( CMAKE_HOST_SYSTEM_NAME STREQUAL AIX )
     # We defer to dynamic detection of the host AIX version.
----------------
hubert.reinterpretcast wrote:
> daltenty wrote:
> > hubert.reinterpretcast wrote:
> > > I think `CMAKE_SYSTEM_NAME` (used above for z/OS) is right: The "host" of the resulting build is the target of this CMake build. @daltenty, if you agree, I think a small patch would make sense (likely to create a merge conflict with this one though)...
> > I agree that is probably more desirable in the long run, though it does create a behavior difference between platforms which rely on "config.guess" (which won't respect the CMAKE_SYSTEM_NAME and will always use the host) and those that don't (i.e. AIX / z/OS).
> @Kai, are you okay with making a drive-by fix for AIX in this patch to keep the usage consistent?
Yes, no problem. What should I add?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83866/new/

https://reviews.llvm.org/D83866



More information about the llvm-commits mailing list