Index: build/config/sanitizers/BUILD.gn |
diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn |
index 193f19a60e8592f061feff3ad2d368faed39b881..2adab21f21602e5aa4487540c0889770505e5658 100644 |
--- a/build/config/sanitizers/BUILD.gn |
+++ b/build/config/sanitizers/BUILD.gn |
@@ -36,7 +36,12 @@ |
ldflags += [ "-fsanitize=thread" ] |
} |
if (is_msan) { |
- ldflags += [ "-fsanitize=memory" ] |
+ ldflags += [ |
+ "-fsanitize=memory", |
+ |
+ # TODO(eugenis): Remove when msan migrates to new ABI (crbug.com/560589). |
+ "-pie", |
+ ] |
} |
if (is_ubsan) { |
ldflags += [ "-fsanitize=undefined" ] |
@@ -139,6 +144,9 @@ |
"-fsanitize=memory", |
"-fsanitize-memory-track-origins=$msan_track_origins", |
"-fsanitize-blacklist=$msan_blacklist_path", |
+ |
+ # TODO(eugenis): Remove when msan migrates to new ABI (crbug.com/560589). |
+ "-fPIC", |
] |
} |
if (is_ubsan) { |