[libc-commits] [libc] [libc] Refactor _build_gpu_objects cmake function. (PR #80631)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Mon Feb 5 07:37:41 PST 2024


================
@@ -567,16 +588,25 @@ function(create_entrypoint_object fq_target_name)
   # GPU builds require special handling for the objects because we want to
   # export several different targets at once, e.g. for both Nvidia and AMD.
   if(LIBC_TARGET_ARCHITECTURE_IS_GPU)
-    _build_gpu_objects(
+    _build_gpu_object_bundle(
       ${fq_target_name}
+      SRCS ${ADD_ENTRYPOINT_OBJ_SRCS}
+      HDRS ${ADD_ENTRYPOINT_OBJ_HDRS}
+      COMPILE_OPTIONS ${common_compile_options} "-DLIBC_COPT_PUBLIC_PACKAGING"
+      CXX_STANDARD ${ADD_ENTRYPOINT_OBJ_CXX_STANDARD}
+      DEPENDS ${full_deps_list}
+      FLAGS "${ADD_ENTRYPOINT_OBJ_FLAGS}"
+    )
+    _build_gpu_object_for_single_arch(
       ${internal_target_name}
+      ${LIBC_GPU_TARGET_ARCHITECTURE}
       SRCS ${ADD_ENTRYPOINT_OBJ_SRCS}
       HDRS ${ADD_ENTRYPOINT_OBJ_HDRS}
       COMPILE_OPTIONS ${common_compile_options}
       CXX_STANDARD ${ADD_ENTRYPOINT_OBJ_CXX_STANDARD}
       DEPENDS ${full_deps_list}
       FLAGS "${ADD_ENTRYPOINT_OBJ_FLAGS}"
-    )
+    )    
----------------
jhuber6 wrote:

Whitespace?

https://github.com/llvm/llvm-project/pull/80631


More information about the libc-commits mailing list