The documentation for forward_variables_from specifies that it will give an error if the variable already exists in the target scope. But this was not implemented. Instead, the value would be silently overwritten.
This change implements the error, and fixes the times this happens in the Linux and Android builds.
Review-Url: https://codereview.chromium.org/1943583002
Cr-Original-Commit-Position: refs/heads/master@{#391136}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0785c950dce7221b10c21e911795e181076b90db
The latest GN binaries rename cpu_arch to current_cpu and/or target_cpu
as appropriate, build_cpu_arch to host_cpu, and os to current_os and target_os as appropriate.
R=brettw@chromium.orgTBR=ddorwin@chromium.org
EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg
BUG=344767
Review URL: https://codereview.chromium.org/913373002
Cr-Original-Commit-Position: refs/heads/master@{#317223}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4327621a322c964a8bc6d1ef5a4534f0f877d63e
A starting point for doing all of src, and adding a PRESUBMIT.
Includes https://codereview.chromium.org/772663002/ and https://codereview.chromium.org/770053002/.
I haven't pushed new binaries yet.
Generated via:
> cd build
> git ls-files *.gn *.gni | sed -e "s/^/@..\\\\out\\\\Debug\\\\gn format --in-place /" >x.bat && x.bat
The only things that I don't love in the current output are:
1. Turning
args = [
"--depfile", rebase_path(depfile, root_build_dir),
"--android-sdk-tools", rebased_android_sdk_build_tools,
"--dex-path", rebased_output,
]
into:
args = [
"--depfile",
rebase_path(depfile, root_build_dir),
"--android-sdk-tools",
rebased_android_sdk_build_tools,
"--dex-path",
rebased_output,
]
The heuristic for this isn't trivial though, and it also affects e.g. '-Xclang' in cflags, as well
as assignments to temporaries that are later assigned to args.
2. Turning single line
if (defined(invoker.inputs)) { inputs = invoker.inputs }
into
if (defined(invoker.inputs)) {
inputs = invoker.inputs
}
This could be argued to be an improvement, but as it's very boilerplate-y perhaps an exception to
allow single line in this case is worthwhile. I think there was discussion of new syntax for this
case too, something like "inputs ?= invoker.inputs" maybe.
In both cases, I think it's worthwhile to get formatting turned on, and then go back and special
case these if we decide it's worthwhile.
R=brettw@chromium.org
BUG=348474
Review URL: https://codereview.chromium.org/766573003
Cr-Original-Commit-Position: refs/heads/master@{#306305}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b199254f481c5db36d56e83fce40594b06d2b81f
The yasm uses of compiled action used sources instead of inputs. Sources applies to the _foreach version but not the plain "compiled_action". These did not trigger an unused variable warning because the declarations themselves dereferenced the sources variable for computing args to the script.
This adds some extra documentation and assertion to the compiled action template. It also adds the binary itself as an input. This should be strictly unnecessary since there should be an implicit dependency on the target, but I like this since it makes things more explicit.
R=ajwong@chromium.org
Review URL: https://codereview.chromium.org/505403002
Cr-Original-Commit-Position: refs/heads/master@{#292447}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4b04efb439a19c6dfef213a2fe51751b223f9cbd
This is forked off of https://codereview.chromium.org/266613002 The code to compile yasm itself is mostly from that patch, with a few updates for the other changes.
Adds a template for running compiled binaries. Compared to Albert's patch above, this assumes the binary is generated by the source tree so can have a cleaner interface (just specify the label of the tool you use).
The yasm rule is new compared to Albert's patch. It uses a special wrapper script instead of the new compiled_action templates so it can properly support depfiles. This also adds convenient support for defines and include dirs.
This adds some trivial ios changes to the content/public/browser. This should be a NOP now.
Fixes a bug in GN depfile creation. Previously, the .d file was emitted as an output of the script, but this confuses ninja. This change just removes that.
BUG=
R=ajwong@chromium.org
Review URL: https://codereview.chromium.org/321323004
git-svn-id: http://src.chromium.org/svn/trunk/src/build@276772 4ff67af0-8c30-449e-8e8b-ad334ec8d88c