File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -564,8 +564,10 @@ function(add_integration_test test_name)
564
564
565
565
if (LIBC_TARGET_ARCHITECTURE_IS_GPU )
566
566
target_link_options (${fq_build_target_name} PRIVATE -nostdlib -static )
567
- else ( )
567
+ elseif ( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
568
568
target_link_options (${fq_build_target_name} PRIVATE -nolibc -nostartfiles -nostdlib++ -static )
569
+ else ()
570
+ target_link_options (${fq_build_target_name} PRIVATE -nolibc -nostartfiles -nostdlib -static )
569
571
endif ()
570
572
target_link_libraries (
571
573
${fq_build_target_name}
@@ -741,8 +743,10 @@ function(add_libc_hermetic_test test_name)
741
743
742
744
if (LIBC_TARGET_ARCHITECTURE_IS_GPU )
743
745
target_link_options (${fq_build_target_name} PRIVATE -nostdlib -static )
744
- else ( )
746
+ elseif ( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
745
747
target_link_options (${fq_build_target_name} PRIVATE -nolibc -nostartfiles -nostdlib++ -static )
748
+ else ()
749
+ target_link_options (${fq_build_target_name} PRIVATE -nolibc -nostartfiles -nostdlib -static )
746
750
endif ()
747
751
target_link_libraries (
748
752
${fq_build_target_name}
Original file line number Diff line number Diff line change @@ -104,6 +104,8 @@ void *__dso_handle = nullptr;
104
104
105
105
} // extern "C"
106
106
107
+ void *operator new (unsigned long size, void *ptr) { return ptr; }
108
+
107
109
void *operator new (size_t size) { return malloc (size); }
108
110
109
111
void *operator new [](size_t size) { return malloc (size); }
@@ -113,3 +115,5 @@ void operator delete(void *) {
113
115
// we just trap here to catch any such accidental usages.
114
116
__builtin_trap ();
115
117
}
118
+
119
+ void operator delete (void *ptr, size_t size) { __builtin_trap (); }
You can’t perform that action at this time.
0 commit comments