append("-fsanitize=fuzzer-no-link" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
endif()
if (LLVM_USE_SANITIZER MATCHES ".*Undefined.*")
- set(IGNORELIST_FILE "${CMAKE_SOURCE_DIR}/utils/sanitizers/ubsan_ignorelist.txt")
+ set(IGNORELIST_FILE "${PROJECT_SOURCE_DIR}/utils/sanitizers/ubsan_ignorelist.txt")
if (EXISTS "${IGNORELIST_FILE}")
# Use this option name version since -fsanitize-ignorelist is only
# accepted with clang 13.0 or newer.
-set(LLVM_TARGET_DEFINITIONS ${CMAKE_SOURCE_DIR}/lib/Target/RISCV/RISCV.td)
-tablegen(LLVM RISCVTargetParserDef.inc -gen-riscv-target-def -I ${CMAKE_SOURCE_DIR}/lib/Target/RISCV/)
+set(LLVM_TARGET_DEFINITIONS ${PROJECT_SOURCE_DIR}/lib/Target/RISCV/RISCV.td)
+tablegen(LLVM RISCVTargetParserDef.inc -gen-riscv-target-def -I ${PROJECT_SOURCE_DIR}/lib/Target/RISCV/)
add_public_tablegen_target(RISCVTargetParserTableGen)
-
include_directories(
- ${CMAKE_SOURCE_DIR}/lib/Target/PowerPC
- ${CMAKE_BINARY_DIR}/lib/Target/PowerPC
+ ${PROJECT_SOURCE_DIR}/lib/Target/PowerPC
+ ${PROJECT_BINARY_DIR}/lib/Target/PowerPC
)
set(LLVM_LINK_COMPONENTS
include_directories(
- ${CMAKE_SOURCE_DIR}/lib/Target/WebAssembly
- ${CMAKE_BINARY_DIR}/lib/Target/WebAssembly
+ ${PROJECT_SOURCE_DIR}/lib/Target/WebAssembly
+ ${PROJECT_BINARY_DIR}/lib/Target/WebAssembly
)
set(LLVM_LINK_COMPONENTS
include_directories(
- ${CMAKE_SOURCE_DIR}/lib/Target/X86
- ${CMAKE_BINARY_DIR}/lib/Target/X86
+ ${PROJECT_SOURCE_DIR}/lib/Target/X86
+ ${PROJECT_BINARY_DIR}/lib/Target/X86
)
set(LLVM_LINK_COMPONENTS