Skip to content

Commit

Permalink
Remove unnecessary read_config on sanitizer
Browse files Browse the repository at this point in the history
Summary: This read_config to set nosan modifier was necessary because the fbcode modefiles didn't inject modifiers. Now they do, so now we can remove this read_config

Reviewed By: IanChilds

Differential Revision: D67432138

fbshipit-source-id: d2f95a9b5a5e831d057064ec56dc0a3ee5b9cb3f
  • Loading branch information
Scott Cao authored and facebook-github-bot committed Dec 19, 2024
1 parent ee3f0ad commit ea5cfd2
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions app/modifier.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,7 @@ def buck2_modifiers():
"ovr_config//build_mode/default_opt_cxx:enabled": (
"ovr_config//build_mode:no-san"
),
# Unfortunately, setting `ovr_config//build_mode:no-san` like this is a bit problematic when using sanitizer
# modefiles because the no-san value here would override the sanitizer constraint set by those modefiles
# in the target platform, meaning we would always get sanitizer disabled no matter what sanitizer modefile
# is used. To work around this, explicitly check that we are not using any sanitizer modefile by checking
# that the `fbcode.sanitizer` buckconfig is set to the default value "address-undefined-dev". We can undo this
# change in the future when our CI is updated to use sanitizer modifiers instead of sanitizer modefiles.
}) if read_config("fbcode", "sanitizer") == "address-undefined-dev" else None,
}),
modifiers.conditional({
"DEFAULT": None,
"ovr_config//build_mode/default_opt_cxx:enabled": modifiers.conditional({
Expand Down

0 comments on commit ea5cfd2

Please sign in to comment.