Skip to content

Commit

Permalink
gcc: forbid combination of more sanitizers
Browse files Browse the repository at this point in the history
  • Loading branch information
lzaoral committed Feb 15, 2023
1 parent eed609e commit f0a28c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion py/plugins/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ def init_parser(self, parser):
help="set $CC and $CXX to gcc and g++, respectively, for build")

# -fsanitize={address,leak} cannot be combined with -fsanitize=thread
# generally, more sanitizer libraries cannot be combined because
# the collection results would be unreliable:
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94328
group = parser.add_mutually_exclusive_group()
group.add_argument(
"--gcc-sanitize-address", action="store_true",
Expand All @@ -109,7 +112,7 @@ def init_parser(self, parser):
"--gcc-sanitize-thread", action="store_true",
help="enable %%check and compile with -fsanitize=thread")

parser.add_argument(
group.add_argument(
"--gcc-sanitize-undefined", action="store_true",
help="enable %%check and compile with -fsanitize=undefined")

Expand Down

0 comments on commit f0a28c2

Please sign in to comment.