[PATCH] D75914: systemz: allow configuring default CLANG_SYSTEMZ_ARCH

Dimitri John Ledkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 27 17:05:47 PDT 2020


xnox updated this revision to Diff 253251.
xnox marked an inline comment as done.

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

https://reviews.llvm.org/D75914

Files:
  clang/CMakeLists.txt
  clang/lib/Driver/ToolChains/Arch/SystemZ.cpp


Index: clang/lib/Driver/ToolChains/Arch/SystemZ.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Arch/SystemZ.cpp
+++ clang/lib/Driver/ToolChains/Arch/SystemZ.cpp
@@ -47,7 +47,7 @@
 
     return std::string(CPUName);
   }
-  return "z10";
+  return CLANG_SYSTEMZ_DEFAULT_ARCH;
 }
 
 void systemz::getSystemZTargetFeatures(const Driver &D, const ArgList &Args,
Index: clang/CMakeLists.txt
===================================================================
--- clang/CMakeLists.txt
+++ clang/CMakeLists.txt
@@ -306,6 +306,10 @@
     "Default architecture for OpenMP offloading to Nvidia GPUs." FORCE)
 endif()
 
+set(CLANG_SYSTEMZ_DEFAULT_ARCH "z10" CACHE STRING
+  "SystemZ Default Arch")
+add_definitions( -DCLANG_SYSTEMZ_DEFAULT_ARCH="${CLANG_SYSTEMZ_DEFAULT_ARCH}")
+
 set(CLANG_VENDOR ${PACKAGE_VENDOR} CACHE STRING
   "Vendor-specific text for showing with version information.")
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75914.253251.patch
Type: text/x-patch
Size: 942 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200328/c05e5fff/attachment.bin>


More information about the llvm-commits mailing list