[CFI] Require LLD for ProtectedMemory on Linux gold, used to link on Android and CrOs, does not create a read-only segment. It places read-only sections, like the one for ProtectedMemory, in the read-execute segment and could cause executable pages to be marked read-only. Workaround this by requiring the use of lld on Linux builds while those platforms are ported to lld. BUG=chromium:792777 Change-Id: I5e9fd5cebb96852f1f2891109e1ecca6cd23790e Reviewed-on: https://chromium-review.googlesource.com/823274 Reviewed-by: Dirk Pranke <dpranke@chromium.org> Reviewed-by: Peter Collingbourne <pcc@chromium.org> Reviewed-by: Brett Wilson <brettw@chromium.org> Commit-Queue: Peter Collingbourne <pcc@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#524148} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: e8d5151f70c4812d85884a0153d73f83ad04cd5d
diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py index 9b3ebe3..643ffaf 100755 --- a/tools/gn/bootstrap/bootstrap.py +++ b/tools/gn/bootstrap/bootstrap.py
@@ -188,6 +188,10 @@ 'UNSAFE_DEVELOPER_BUILD': 'false' }) + write_buildflag_header_manually(root_gen_dir, + 'base/memory/protected_memory_flags.h', + { 'USE_LLD': 'false' }) + write_buildflag_header_manually(root_gen_dir, 'base/cfi_flags.h', { 'CFI_CAST_CHECK': 'false',