Consider updating or removing mac_sdk_min_build_override. |
|||||
Issue descriptionChrome supplies mac_sdk_min_build_override to allow other projects [v8, webrtc, libyuv, pdfium] to supply their own min sdk when built as standalone projects. Most of these projects are now using the same SDK version as Chrome. Chrome: mac_sdk_min_build_override = "10.10" webrtc: mac_sdk_min_build_override = "10.11" [This isn't indexed by cs.chromium.org, check out webrtc source and see build_overrides/build.gni]. v8: mac_sdk_min_build_override = "10.10" libyuv: mac_sdk_min_build_override = "10.11" pdfium: mac_sdk_min_build_override = "10.10" libyuv's change was introduced at: https://codereview.chromium.org/1870473002, with the stated intention of using the same overrides at webrtc. In the not too distant future, Chrome is going to be rolling to the 10.12 SDK. At the very least, we should remove the v8 and pdfium overrides. We may want to consider rolling webrtc/libyuv to 10.12 as well, at which point we could get rid of this override entirely. That being said, it may be convenient for subprojects to be able to roll their SDK at a different rate from Chromium.
,
Jul 11 2017
dpranke: I tried to update this for webrtc: https://codereview.webrtc.org/2979603002/ But I get a compile error because I'm setting mac_sdk_min on non-mac OSes, but, I also can't use "if (is_mac)" since that gets loaded at "build/config/BUILDCONFIG.gn", which I guess hasn't been loaded at the time ".gn" is being loaded?
,
Jul 11 2017
Ah. You're getting an "unused arg" warning from GN, which isn't normally fatal. However, the way that recipe works, it calls out to GN to get a list of targets to build, and it looks like they way they're parsing the list is broken (not filtering out the warning message).
*However*, that doesn't actually address your problem, which is a real one, i.e.: how do you specify an argument in default_args that may only be declared in some configurations?
That's a good question. I don't actually have a good answer at the moment, here's some rambling:
First, it is possible to hack around this in at least one way, but I don't particularly like the idea.
For example, you could add the following to //build/toolchain/toolchain.gni:
if (!is_mac) {
declare_args() {
mac_sdk_min = "unused"
}
assert(mac_sdk_min == "unused" || true)
}
This would work because pretty much every config ends up including toolchain.gni, but, in theory, the only toolchains that did include mac_sdk.gni would also have is_mac==true. But, I don't like this for the probably obvious reason that the dependency is not at all obvious.
Another alternative would be to modify toolchain.gni to unconditionally include mac_sdk.gni and, more generally, do something like move all of the variables that you want to be able to override per-project into some file that *is* commonly included. But, this seems almost as bad as using build_overrides.
Yet another alternative would be to expose more variables to the context that the dotfile is parsed in. For example, you could make the builtin vars like host_os be defined. But, that probably wouldn't solve every need.
A fourth alternative would be to modify GN to not complain about variables declared in default_args {} if they weren't used. I'm not wild about this idea either, but it might be the best option.
brettw@, WDYT?
,
Jul 11 2017
,
Jul 11 2017
I prefer keeping the checking for unused variables in the build overrides: there is some danger that these can get out of sync for various projects and we should tell people when things are obsolete.
My preference would be to move the declare_args for the variables we expect people to be able to override to a separate .gni file that the //build/config/BUILD.gn can include (along with the existing mac_sdk.gni). Then have an if (!is_mac) { assert... thing in that build file to unconditionally mark those used.
,
Jul 11 2017
Creating a new .gni file SGTM.
,
Jul 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f42b89b85146f1cf98bb7424e88227ed9d9da623 commit f42b89b85146f1cf98bb7424e88227ed9d9da623 Author: Erik Chen <erikchen@chromium.org> Date: Thu Jul 13 02:56:20 2017 Create build/config/overrides.gni to host subproject-overridable variables. Move mac_sdk_min into build/config/overrides.gni and assert that it is used. This prevents unused arg warnings from subprojects that override it. Bug: 740693 Change-Id: Ib40a52c59c852aab46781a0d44812b07b0e5061c Reviewed-on: https://chromium-review.googlesource.com/566595 Reviewed-by: Brett Wilson <brettw@chromium.org> Reviewed-by: Dirk Pranke <dpranke@chromium.org> Commit-Queue: Erik Chen <erikchen@chromium.org> Cr-Commit-Position: refs/heads/master@{#486240} [modify] https://crrev.com/f42b89b85146f1cf98bb7424e88227ed9d9da623/build/config/BUILD.gn [modify] https://crrev.com/f42b89b85146f1cf98bb7424e88227ed9d9da623/build/config/mac/mac_sdk.gni [add] https://crrev.com/f42b89b85146f1cf98bb7424e88227ed9d9da623/build/config/mac/mac_sdk_overrides.gni
,
Jul 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/external/webrtc.git/+/0ff780005965f366d7238773127999dda15c6a1b commit 0ff780005965f366d7238773127999dda15c6a1b Author: erikchen <erikchen@chromium.org> Date: Thu Jul 13 16:03:13 2017 Update .gn to set a min SDK for macOS. Currently, WebRTC is setting this config via mac_sdk_min_build_override. The old mechanism is deprecated, but cannot be removed until chromium is updated to no longer require mac_sdk_min_build_override. BUG= chromium:740693 TBR=kjellander@webrtc.org Review-Url: https://codereview.webrtc.org/2979603002 Cr-Commit-Position: refs/heads/master@{#19006} [modify] https://crrev.com/0ff780005965f366d7238773127999dda15c6a1b/.gn
,
Jul 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/libyuv/libyuv.git/+/95a20b677d626bd21f5bf3df2e94482bb7630336 commit 95a20b677d626bd21f5bf3df2e94482bb7630336 Author: Frank Barchard <fbarchard@google.com> Date: Thu Jul 13 17:34:42 2017 Update .gn to set a min SDK for macOS via GN. Currently, libyuv is setting this config via mac_sdk_min_build_override. The old meechanism is deprecated, but cannot be removed until chromium is updated to no longer require mac_sdk_min_build_override. TBR=kjellander@chromium.org Bug: chromium:740693 Change-Id: I71533c9ef20ac8d7584d50751ac5437da54e2cb5 Reviewed-on: https://chromium-review.googlesource.com/565636 Reviewed-by: Frank Barchard <fbarchard@google.com> [modify] https://crrev.com/95a20b677d626bd21f5bf3df2e94482bb7630336/.gn
,
Jul 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2820caa3e3c8e908963255ba3f6cb13e05b18530 commit 2820caa3e3c8e908963255ba3f6cb13e05b18530 Author: Erik Chen <erikchen@chromium.org> Date: Thu Jul 13 23:01:50 2017 Remove mac_sdk_min_build_override. All projects that need to change the default mac min SDK now directly do so via a GN arg. Bug: chromium:740693 Change-Id: I99f04d482177e6ec8a5d1306f68cb2410b0beb0e Reviewed-on: https://chromium-review.googlesource.com/566078 Commit-Queue: Erik Chen <erikchen@chromium.org> Reviewed-by: Dirk Pranke <dpranke@chromium.org> Cr-Commit-Position: refs/heads/master@{#486514} [modify] https://crrev.com/2820caa3e3c8e908963255ba3f6cb13e05b18530/build/config/mac/mac_sdk.gni [modify] https://crrev.com/2820caa3e3c8e908963255ba3f6cb13e05b18530/build/config/mac/mac_sdk_overrides.gni [modify] https://crrev.com/2820caa3e3c8e908963255ba3f6cb13e05b18530/build_overrides/build.gni
,
Jul 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/9fa0d097158e7ae2a254fbf587b6e1ac93bfa3e1 commit 9fa0d097158e7ae2a254fbf587b6e1ac93bfa3e1 Author: erikchen <erikchen@chromium.org> Date: Fri Jul 14 18:24:44 2017 Remove build_override for macOS min SDK and deployment target. v8 now uses the same SDK as Chromium, even when built as a standalone project. The deployment target override has no effect. Bug: chromium:740693 Change-Id: I089f74d5ad1590ff7167564f83b0110620a92ef9 Reviewed-on: https://chromium-review.googlesource.com/565887 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Erik Chen <erikchen@chromium.org> Cr-Commit-Position: refs/heads/master@{#46686} [modify] https://crrev.com/9fa0d097158e7ae2a254fbf587b6e1ac93bfa3e1/build_overrides/build.gni
,
Jul 28 2017
,
Sep 21 2017
Neither WebRTC, V8 or libyuv uses has this anymore. Should this be closed? https://chromium.googlesource.com/v8/v8/+/master/build_overrides/build.gni https://chromium.googlesource.com/libyuv/libyuv/+/master/build_overrides/build.gni https://webrtc.googlesource.com/src/+/master/build_overrides/build.gni
,
Sep 22 2017
I think so. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by dpranke@chromium.org
, Jul 10 2017