diff --git a/amd/comgr/test/CMakeLists.txt b/amd/comgr/test/CMakeLists.txt index 9a8dc9669f434..8ba3d5e7aa898 100644 --- a/amd/comgr/test/CMakeLists.txt +++ b/amd/comgr/test/CMakeLists.txt @@ -246,6 +246,6 @@ add_comgr_test(compile_source_to_executable c) add_comgr_test(name_expression_map_test c) add_comgr_test(compile_hip_test c) add_comgr_test(compile_hip_to_relocatable c) -#add_comgr_test(compile_hip_with_libcxx_test c) +add_comgr_test(compile_hip_with_libcxx_test c) add_comgr_test(mangled_names_hip_test c) #add_comgr_test(unbundle_hip_test c) diff --git a/amd/comgr/test/compile_hip_with_libcxx_test.c b/amd/comgr/test/compile_hip_with_libcxx_test.c index e4c0af73c3ed8..d1d99c40c46bc 100644 --- a/amd/comgr/test/compile_hip_with_libcxx_test.c +++ b/amd/comgr/test/compile_hip_with_libcxx_test.c @@ -82,12 +82,14 @@ int main(int Argc, char *Argv[]) { amd_comgr_action_info_t ActionInfo; amd_comgr_status_t Status; - // Compile options: embedded libc++ headers are mapped to clang's default - // include locations via VFS and injected as a fallback (-idirafter). - // No explicit -I flags needed. + // Embedded libc++ headers are VFS-mapped to clang's default include + // locations and injected at -idirafter priority. -nostdinc++ disables + // system C++ header lookup so the embedded headers are exercised + // (otherwise system libstdc++, when present, wins). const char *CompileOptions[] = { "-std=c++17", - "-nogpuinc" // Don't use GPU-specific includes + "-nogpuinc", // Don't use GPU-specific includes + "-nostdinc++" // Use only the embedded libc++ headers }; size_t CompileOptionsCount = sizeof(CompileOptions) / sizeof(CompileOptions[0]);