Revert of [gn] Don't use PIE for host executables (patchset #2 id:20001 of https://codereview.chromium.org/2179303003/ )
Reason for revert: Breaks roll: https://codereview.chromium.org/2182043004/ Original issue's description: > [gn] Don't use PIE for host executables > > Using PIE switches on ASLR. With mksnapshot, this can lead > to non-deterministic snapshots. > > BUG=v8:5233 > > Committed: https://crrev.com/4ca39b53245619d94a80a93939613774e68e4649 > Cr-Commit-Position: refs/heads/master@{#38084} TBR=jochen@chromium.org,vogelheim@chromium.org,yangguo@chromium.org,machenbach@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:5233 Review-Url: https://codereview.chromium.org/2187613003 Cr-Commit-Position: refs/heads/master@{#38092}
This commit is contained in:
parent
43a86ff3b7
commit
45b5019705
6
BUILD.gn
6
BUILD.gn
@ -2181,9 +2181,6 @@ if (current_toolchain == v8_snapshot_toolchain) {
|
||||
v8_executable("mksnapshot") {
|
||||
visibility = [ ":*" ] # Only targets in this file can depend on this.
|
||||
|
||||
# This is executed on the host only and doesn't require PIE.
|
||||
want_pie = false
|
||||
|
||||
sources = [
|
||||
"src/snapshot/mksnapshot.cc",
|
||||
]
|
||||
@ -2206,9 +2203,6 @@ v8_executable("mkpeephole") {
|
||||
# bytecodes that are described in bytecodes.{cc,h}.
|
||||
visibility = [ ":*" ] # Only targets in this file can depend on this.
|
||||
|
||||
# This is executed on the host only and doesn't require PIE.
|
||||
want_pie = false
|
||||
|
||||
sources = [
|
||||
"src/interpreter/bytecode-peephole-optimizer.h",
|
||||
"src/interpreter/bytecodes.cc",
|
||||
|
14
gni/v8.gni
14
gni/v8.gni
@ -87,19 +87,13 @@ template("v8_source_set") {
|
||||
|
||||
template("v8_executable") {
|
||||
executable(target_name) {
|
||||
forward_variables_from(invoker, "*", [ "configs", "want_pie"])
|
||||
forward_variables_from(invoker, "*", [ "configs" ])
|
||||
configs += invoker.configs
|
||||
configs -= v8_remove_configs
|
||||
configs += v8_add_configs
|
||||
if (!defined(invoker.want_pie) || invoker.want_pie) {
|
||||
if (is_linux) {
|
||||
# For enabling ASLR.
|
||||
ldflags = [ "-pie" ]
|
||||
}
|
||||
} else {
|
||||
if (is_android) {
|
||||
configs -= "//build/config/android:executable_config"
|
||||
}
|
||||
if (is_linux) {
|
||||
# For enabling ASLR.
|
||||
ldflags = [ "-pie" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user