Skip to content

Commit

Permalink
Update build_test_cpp.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Aug 7, 2024
1 parent 1dd674b commit 6f8b7d6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions runtime/src/iree-amd-aie/driver/xrt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,30 @@
# Enable with: -DIREE_EXTERNAL_HAL_DRIVERS=xrt
#-------------------------------------------------------------------------------

string(APPEND CMAKE_CXX_FLAGS " -fsanitize=address")
string(APPEND CMAKE_C_FLAGS " -fsanitize=address")
string(APPEND CMAKE_CXX_FLAGS " -ftrivial-auto-var-init=pattern")
string(APPEND CMAKE_C_FLAGS " -ftrivial-auto-var-init=pattern")

string(APPEND CMAKE_EXE_LINKER_FLAGS " -shared-libasan")
string(APPEND CMAKE_SHARED_LINKER_FLAGS " -shared-libasan")
string(APPEND CMAKE_CXX_FLAGS " -fsanitize=memory")
string(APPEND CMAKE_C_FLAGS " -fsanitize=memory")
iree_append_to_lists(
"-g -fno-omit-frame-pointer -fsanitize=thread"
CMAKE_CXX_FLAGS
CMAKE_C_FLAGS)
iree_append_to_lists(
"-fsanitize=thread"
CMAKE_SHARED_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS
# We don't append to CMAKE_STATIC_LINKER_FLAGS, because object files are
# linked as an object library with llvm-ar and it does not have option
# -fsanitize=thread
)
string(APPEND CMAKE_CXX_FLAGS " -fsanitize=undefined")
string(APPEND CMAKE_C_FLAGS " -fsanitize=undefined")

iree_add_all_subdirs()

iree_register_external_hal_driver(
Expand Down

0 comments on commit 6f8b7d6

Please sign in to comment.