Skip to content

Commit 69bf538

Browse files
committed
Properly share GCC sanitizer tables with Clang
1 parent ff19f59 commit 69bf538

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/tools/clang.lua

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@
6666
unsignedchar = gcc.shared.unsignedchar,
6767
omitframepointer = gcc.shared.omitframepointer,
6868
compileas = gcc.shared.compileas,
69-
sanitize = gcc.shared.sanitize,
69+
sanitize = table.merge(gcc.shared.sanitize, {
70+
Fuzzer = "-fsanitize=fuzzer",
71+
}),
7072
visibility = gcc.shared.visibility,
7173
inlinesvisibility = gcc.shared.inlinesvisibility
7274
}
@@ -118,9 +120,6 @@
118120
--
119121

120122
clang.cxxflags = table.merge(gcc.cxxflags, {
121-
sanitize = {
122-
Fuzzer = "-fsanitize=fuzzer",
123-
},
124123
})
125124

126125
function clang.getcxxflags(cfg)
@@ -254,9 +253,9 @@
254253
end,
255254
},
256255
linker = gcc.ldflags.linker,
257-
sanitize = {
258-
Address = "-fsanitize=address",
259-
},
256+
sanitize = table.merge(gcc.ldflags.sanitize, {
257+
Fuzzer = "-fsanitize=fuzzer",
258+
}),
260259
system = {
261260
wii = "$(MACHDEP)",
262261
}

0 commit comments

Comments
 (0)