[PATCH] D95154: [WIP][clang][Fuchsia] Add the *-fuchsia-gnu arch and multilibs

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 21 13:51:26 PST 2021


phosek added inline comments.


================
Comment at: clang/cmake/caches/Fuchsia-stage2.cmake:148
+
+  foreach(name i386;x86_64;aarch64;riscv64;x86_64_gnu;aarch64_gnu)
+    if(${name} MATCHES ".*_gnu$")
----------------
I'd just iterate over full triples rather than doing the `.*_gnu` replacement, see above what we do for Linux. The same below.


================
Comment at: clang/cmake/caches/Fuchsia-stage2.cmake:219-236
+    set(RUNTIMES_${target}+noexcept_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "")
+    set(RUNTIMES_${target}+noexcept_LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
+    set(RUNTIMES_${target}+noexcept_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
+
+    set(RUNTIMES_${target}+asan+noexcept_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "")
+    set(RUNTIMES_${target}+asan+noexcept_LLVM_USE_SANITIZER "Address" CACHE STRING "")
+    set(RUNTIMES_${target}+asan+noexcept_LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "")
----------------
I'd break this off into a separate `foreach` loop and only do it for the non-GNU variant.


================
Comment at: clang/test/Driver/fuchsia.cpp:104-119
+// RUN:     | FileCheck %s -check-prefixes=CHECK-MULTIARCH-X86-GNU
+// RUN: %clangxx %s -### --target=x86_64-fuchsia-gnu -fsanitize=address \
+// RUN:     -ccc-install-dir %S/Inputs/basic_fuchsia_tree/bin \
+// RUN:     -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
+// RUN:     -fuse-ld=lld 2>&1\
+// RUN:     | FileCheck %s -check-prefixes=CHECK-MULTIARCH-X86-GNU,CHECK-MULTIARCH-ASAN-X86-GNU
+// RUN: %clangxx %s -### --target=x86_64-fuchsia-gnu -fno-exceptions \
----------------
I don't think we need these multilibs for the GNU variant.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95154



More information about the cfe-commits mailing list