[PATCH] D145411: [WIP][Fuchsia] Include baremetal ARM builtins

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 6 11:34:46 PST 2023


phosek created this revision.
Herald added subscribers: abrachet, kristof.beyls.
Herald added a project: All.
phosek requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145411

Files:
  clang/cmake/caches/Fuchsia-stage2.cmake


Index: clang/cmake/caches/Fuchsia-stage2.cmake
===================================================================
--- clang/cmake/caches/Fuchsia-stage2.cmake
+++ clang/cmake/caches/Fuchsia-stage2.cmake
@@ -125,6 +125,20 @@
   set(RUNTIMES_${target}_CMAKE_MODULE_LINKER_FLAGS ${WINDOWS_LINK_FLAGS} CACHE STRING "")
 endif()
 
+foreach(target arm-none-eabi)
+  list(APPEND BUILTIN_TARGETS "${target}")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR ARM CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+  foreach(lang C;CXX;ASM)
+    set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "--target=${target}" CACHE STRING "")
+  endforeach()
+  foreach(type SHARED;MODULE;EXE)
+    set(BUILTINS_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
+  endforeach()
+  set(BUILTINS_${target}_COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "")
+endif()
+
 foreach(target aarch64-unknown-linux-gnu;armv7-unknown-linux-gnueabihf;i386-unknown-linux-gnu;x86_64-unknown-linux-gnu)
   if(LINUX_${target}_SYSROOT)
     # Set the per-target builtins options.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145411.502743.patch
Type: text/x-patch
Size: 1161 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230306/864f3032/attachment.bin>


More information about the cfe-commits mailing list