File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ function(add_benchmark benchmark_name)
2424 libc.src.stdio.printf
2525 ${BENCHMARK_DEPENDS}
2626 ${BENCHMARK_UNPARSED_ARGUMENTS}
27+ COMPILE_OPTIONS
28+ -flto
2729 )
2830 get_fq_target_name(${benchmark_name} fq_target_name)
2931 set (fq_build_target_name ${fq_target_name} .__build__)
Original file line number Diff line number Diff line change @@ -474,6 +474,8 @@ function(add_integration_test test_name)
474474 target_link_options (${fq_build_target_name} PRIVATE
475475 ${LIBC_COMPILE_OPTIONS_DEFAULT} -Wno-multi-gpu
476476 "-Wl,--suppress-stack-size-warning"
477+ "-Wl,-mllvm,-nvptx-lower-global-ctor-dtor=1"
478+ "-Wl,-mllvm,-nvptx-emit-init-fini-kernel"
477479 -march=${LIBC_GPU_TARGET_ARCHITECTURE} -nostdlib -static
478480 "--cuda-path=${LIBC_CUDA_ROOT} " )
479481 elseif (LIBC_CC_SUPPORTS_NOSTDLIBPP)
@@ -657,6 +659,8 @@ function(add_libc_hermetic test_name)
657659 target_link_options (${fq_build_target_name} PRIVATE
658660 ${LIBC_COMPILE_OPTIONS_DEFAULT} -Wno-multi-gpu
659661 "-Wl,--suppress-stack-size-warning"
662+ "-Wl,-mllvm,-nvptx-lower-global-ctor-dtor=1"
663+ "-Wl,-mllvm,-nvptx-emit-init-fini-kernel"
660664 -march=${LIBC_GPU_TARGET_ARCHITECTURE} -nostdlib -static
661665 "--cuda-path=${LIBC_CUDA_ROOT} " )
662666 elseif (LIBC_CC_SUPPORTS_NOSTDLIBPP)
You can’t perform that action at this time.
0 commit comments