Skip to content

[compiler-rt] Fix build breakage #96235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

alexander-shaposhnikov
Copy link
Collaborator

@alexander-shaposhnikov alexander-shaposhnikov commented Jun 20, 2024

Add missing flags in cmake.
Follow-up to cae6d45.

Add missing flags in Cmake.
Follow-up to cae6d45.
@llvmbot
Copy link
Member

llvmbot commented Jun 20, 2024

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Alexander Shaposhnikov (alexander-shaposhnikov)

Changes

Add missing flags in Cmake.
Follow-up to cae6d45.


Full diff: https://github.com/llvm/llvm-project/pull/96235.diff

1 Files Affected:

  • (modified) compiler-rt/lib/nsan/tests/CMakeLists.txt (+8-1)
diff --git a/compiler-rt/lib/nsan/tests/CMakeLists.txt b/compiler-rt/lib/nsan/tests/CMakeLists.txt
index e6674e12b548b..3d962e70a7bf0 100644
--- a/compiler-rt/lib/nsan/tests/CMakeLists.txt
+++ b/compiler-rt/lib/nsan/tests/CMakeLists.txt
@@ -3,12 +3,19 @@ include(CompilerRTCompile)
 set(NSAN_UNITTEST_CFLAGS
   ${COMPILER_RT_UNITTEST_CFLAGS}
   ${COMPILER_RT_GTEST_CFLAGS}
-  -I${COMPILER_RT_SOURCE_DIR}/lib/
+  ${SANITIZER_TEST_CXX_CFLAGS}
+  -I${COMPILER_RT_SOURCE_DIR}/include
+  -I${COMPILER_RT_SOURCE_DIR}/lib
   -DSANITIZER_COMMON_REDEFINE_BUILTINS_IN_STD
   -O2
   -g
   -fno-omit-frame-pointer)
 
+set(NSAN_UNITTEST_LINK_FLAGS
+  ${COMPILER_RT_UNITTEST_LINK_FLAGS}
+  ${COMPILER_RT_UNWINDER_LINK_LIBS}
+  ${SANITIZER_TEST_CXX_LIBRARIES})
+
 file(GLOB NSAN_HEADERS ../*.h)
 set(NSAN_UNITTESTS
 	NSanUnitTest.cpp

Copy link
Contributor

@ilovepi ilovepi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexander-shaposhnikov alexander-shaposhnikov merged commit e674e73 into llvm:main Jun 21, 2024
9 checks passed
AlexisPerry pushed a commit to llvm-project-tlp/llvm-project that referenced this pull request Jul 9, 2024
Add missing flags in cmake.
Follow-up to cae6d45.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants