Commit 40753b23 authored by Bill Budge's avatar Bill Budge Committed by Commit Bot

[Build] Add an 'is_unsafe_developer_build' gn argument.

- Adds an UNSAFE_DEVELOPER_BUILD flag too.

Bug: chromium:756050
Change-Id: I17bf8fcfb331f3fa11541fed64e9dae48a1c529f
Reviewed-on: https://chromium-review.googlesource.com/714443Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509528}
parent 192ee72b
...@@ -45,6 +45,11 @@ declare_args() { ...@@ -45,6 +45,11 @@ declare_args() {
# (file, function, line). False means only the program counter (and currently # (file, function, line). False means only the program counter (and currently
# file name) is saved. # file name) is saved.
enable_location_source = true enable_location_source = true
# Unsafe developer build. Has developer-friendly features that may weaken or
# disable security measures like sandboxing or ASLR.
# IMPORTANT: Unsafe developer builds should never be distributed to end users.
is_unsafe_developer_build = !is_official_build
} }
if (is_android) { if (is_android) {
...@@ -1694,6 +1699,7 @@ buildflag_header("debugging_flags") { ...@@ -1694,6 +1699,7 @@ buildflag_header("debugging_flags") {
"ENABLE_LOCATION_SOURCE=$enable_location_source", "ENABLE_LOCATION_SOURCE=$enable_location_source",
"ENABLE_PROFILING=$enable_profiling", "ENABLE_PROFILING=$enable_profiling",
"CAN_UNWIND_WITH_FRAME_POINTERS=$can_unwind_with_frame_pointers", "CAN_UNWIND_WITH_FRAME_POINTERS=$can_unwind_with_frame_pointers",
"UNSAFE_DEVELOPER_BUILD=$is_unsafe_developer_build",
] ]
} }
......
...@@ -49,7 +49,7 @@ declare_args() { ...@@ -49,7 +49,7 @@ declare_args() {
# and means its definition can participate in the build graph, only recompiling # and means its definition can participate in the build graph, only recompiling
# things when it actually changes. # things when it actually changes.
# #
# See //build/buildflag_header.gni for inntructions on generating headers. # See //build/buildflag_header.gni for instructions on generating headers.
# #
# This will also allow you to scope your build flag to a BUILD.gn file (or a # This will also allow you to scope your build flag to a BUILD.gn file (or a
# .gni file if you need it from more than one place) rather than making global # .gni file if you need it from more than one place) rather than making global
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment