Skip to content

Commit e885ced

Browse files
committed
using clang with ceedling unit-test with -fsanitize=address
1 parent 8245751 commit e885ced

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

test/unit-test/project.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,24 @@
7878
:html_high_threshold: 90
7979
:xml_report: FALSE
8080

81-
#:tools:
82-
# Ceedling defaults to using gcc for compiling, linking, etc.
83-
# As [:tools] is blank, gcc will be used (so long as it's in your system path)
84-
# See documentation to configure a given toolchain for use
81+
:tools:
82+
:test_compiler:
83+
:executable: clang
84+
:name: 'clang compiler'
85+
:arguments:
86+
- -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE #expands to -I search paths
87+
- -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR #expands to -I search paths
88+
- -D$: COLLECTION_DEFINES_TEST_AND_VENDOR #expands to all -D defined symbols
89+
- -fsanitize=address
90+
- -c ${1} #source code input file (Ruby method call param list sub)
91+
- -o ${2} #object file output (Ruby method call param list sub)
92+
:test_linker:
93+
:executable: clang
94+
:name: 'clang linker'
95+
:arguments:
96+
- -fsanitize=address
97+
- ${1} #list of object files to link (Ruby method call param list sub)
98+
- -o ${2} #executable file output (Ruby method call param list sub)
8599

86100
# LIBRARIES
87101
# These libraries are automatically injected into the build process. Those specified as

0 commit comments

Comments
 (0)