-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set sb_is_modular appropriately for modular builds #1181
Conversation
d891494
to
c1078c0
Compare
c1078c0
to
b618328
Compare
241202c
to
ecaa709
Compare
starboard/evergreen/shared/platform_configuration/configuration.gni
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## main #1181 +/- ##
==========================================
+ Coverage 56.53% 56.57% +0.04%
==========================================
Files 1899 1900 +1
Lines 94300 94334 +34
==========================================
+ Hits 53308 53365 +57
+ Misses 40992 40969 -23 |
ecaa709
to
05cb206
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did 1st pass.
ae51941
to
5a14b28
Compare
f98b85c
to
7ec515d
Compare
@@ -149,7 +150,6 @@ template("gcc_toolchain") { | |||
toolchain_args = { | |||
# Populate toolchain args from the invoker. | |||
forward_variables_from(invoker_toolchain_args, "*") | |||
build_with_separate_cobalt_toolchain = build_with_separate_cobalt_toolchain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You instead should be passing through is_modular_toolchain to propagate it to other toolchains
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the toolchain need the argument if we have a global variable to indicate we are building modular?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the variable is only global to the toolchain, it doesn't propagate to the other toolchains unless passed to them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont understand, GN normally complains if the variable is not needed/ not set . None of he tests fail in the GN step because of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GN normally complains if the variable is not needed/ not set
The variable is needed and is set, it's just a question of what it's set to. It works now as (I believe) it is implicitly passing the variable from the outer scope to the scope captured by toolchain_args
—so it is set correctly, but brittle and it's better to be explicit about passing the same value through
See https://gn.googlesource.com/gn/+/master/docs/reference.md#toolchain-overview for more info
@@ -79,10 +81,8 @@ group("default") { | |||
"//components/crx_file", | |||
"//components/prefs", | |||
"//components/update_client", | |||
"//third_party/llvm-project/libunwind:unwind_evergreen", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this isn't directly part of this PR, but this if block should not be nested in this if (sb_is_modular)
block, it should be its own conditional (for cleanliness)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you are maybe fighting the agreement that evergreen builds are modular.
I think this should remain here, otherwise it looks out of place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@y4vor thoughts ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not—it would just clean up the code to unnest this. sb_is_modular && sb_is_evergreen
is just equivalent to sb_is_evergreen
ec7b9ee
to
914a5bd
Compare
c15bb40
to
7d8e74a
Compare
7d8e74a
to
effb350
Compare
b/294267479 Set sb_is_modular = is_modular_toolchain || sb_is_evergreen in starboard/build/config/modular/helper_variables.gni. Replace instances of build_with_separate_cobalt_toolchain with sb_is_modular, sb_is_evergreen. In certain places during starboard/build/config/BUILDCONFIG.gn build_with_separate_cobalt_toolchain cannot be replaced with sb_is_modular, sb_is_evergreen Fix gn errors caused due to sb_is_modular being imported before it's defined. Change-Id: I99d89f67c354252a121ddd7f2e4c95c2f4aa2b2a
effb350
to
952ca23
Compare
b/294230277 Change-Id: I00c3832e12f8bd012a34ec9b962e70e82cc85f99
952ca23
to
953faab
Compare
Got resolved and merged in 2 separate PR's |
b/294267479
b/294230277
Modular builds are of 2 types:
This change consolidates the build system to have mostly 2 flags for modular builds - sb_is_modular, sb_is_evergreen
Set sb_is_modular = build_with_separate_cobalt_toolchain || sb_is_evergreen
in starboard/build/config/modular/helper_variables.gni.
Change-Id: Ie1e38b2e0487d01960db9a975899f9760bc78415