Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion amd/comgr/src/comgr-clang-command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ bool skipProblematicFlag(IteratorTy &It, const IteratorTy &End) {
// Skip flags related to opencl-c headers or device-libs builtins.
StringRef Arg = *It;
static const StringSet<> FlagsWithPathArg = {"-I", "-dumpdir", "-include",
"-mlink-builtin-bitcode"};
"-mlink-builtin-bitcode",
"-mlink-bitcode-file"};
bool IsFlagWithPathArg = It + 1 != End && FlagsWithPathArg.contains(Arg);
if (IsFlagWithPathArg) {
++It;
Expand Down
30 changes: 30 additions & 0 deletions amd/comgr/test-lit/cache-tests/compile-hip-asan-cached.hip
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// COM: Compile a HIP source with AddressSanitizer enabled while the Comgr
// COM: command cache is active.

// COM: Start from a clean cache and enable it for this test.
// RUN: rm -fr %t.cache
// RUN: export AMD_COMGR_CACHE=1
// RUN: export AMD_COMGR_CACHE_DIR=%t.cache

// COM: Compile with the cache enabled.
// RUN: compile-hip-asan %s %t.bin

// COM: Verify the kernel exists
// RUN: %llvm-objdump -d %t.bin | %FileCheck %s
// CHECK: <_Z3addPfS_S_>:
// CHECK: s_endpgm

// COM: Verify ASAN runtime symbols are present
// RUN: %llvm-objdump -t %t.bin | %FileCheck %s --check-prefix=ASAN
// ASAN: __asan_memcpy
// ASAN: __asan_memmove
// ASAN: __asan_load1
// ASAN: __asan_store1

// COM: The cache directory should have been populated.
// RUN: [ -d %t.cache ]

__attribute__((global))
void add(float *A, float *B, float *C) {
*C = *A + *B;
}
Loading