Skip to content

Commit

Permalink
Set sb_is_modular appropriately, build linux using sb_is_modular (#1206)
Browse files Browse the repository at this point in the history
b/294267479
b/294230277

Set sb_is_modular = sb_is_evergreen ||
build_with_separate-cobalt_toolchain
Set sb_is_evergreen = !build_with_separate-cobalt_toolchain

This PR forces linux-modular builds to be built with sb_is_modular =
true and sb_is_evergreen = false

Change-Id: Ie9464ce4350023063f2ca0dfbecb2e917cd4ba3b
(cherry picked from commit 5d61db9)
  • Loading branch information
niranjanyardi committed Aug 21, 2023
1 parent c58b17b commit 0284300
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions starboard/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ group("starboard") {
"//starboard/client_porting/eztime",
]

if (sb_is_modular) {
if (sb_is_modular && current_toolchain == cobalt_toolchain) {
public_deps += [
"//third_party/llvm-project/compiler-rt:compiler_rt",
"//third_party/llvm-project/libcxx:cxx",
Expand Down Expand Up @@ -192,7 +192,7 @@ if (current_toolchain == starboard_toolchain) {
} else {
public_deps += [ "//third_party/crashpad/wrapper:wrapper_stub" ]
}
if (!sb_is_modular) {
if (!sb_is_evergreen) {
public_deps += [ "//$starboard_path:starboard_platform" ]
}
}
Expand Down
3 changes: 2 additions & 1 deletion starboard/build/config/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ config("warnings_as_errors") {
# override flags specified in a platform's "platform_configuration" config,
# which is where these particular flags would otherwise naturally fit.
config("default_compiler_flags") {
if (is_starboardized_toolchain && sb_is_modular && target_cpu == "arm") {
if (is_starboardized_toolchain && sb_is_modular &&
current_toolchain == cobalt_toolchain && target_cpu == "arm") {
cflags = [ "-mfpu=vfpv3" ]
asmflags = cflags
}
Expand Down
3 changes: 3 additions & 0 deletions starboard/build/config/BUILDCONFIG.gn
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ import("//starboard/build/config/toolchain_variables.gni")
import("//$starboard_path/platform_configuration/configuration.gni")
import("//starboard/build/config/build_assertions.gni")

# TODO(b/295399926) Clean up flag by moving to modular/helper_var.gni
sb_is_modular = sb_is_evergreen || build_with_separate_cobalt_toolchain

declare_args() {
use_tsan = getenv("USE_TSAN") == 1
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

import("//starboard/build/config/base_configuration.gni")

sb_is_modular = true

sb_is_evergreen = true
sb_is_evergreen = !build_with_separate_cobalt_toolchain

cobalt_font_package = "empty"

Expand Down
2 changes: 1 addition & 1 deletion starboard/extension/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ target(gtest_target_type, "extension_test") {
"//testing/gmock",
"//testing/gtest",
]
if (sb_is_modular) {
if (sb_is_modular && current_toolchain == cobalt_toolchain) {
deps += cobalt_platform_dependencies
}
}
2 changes: 1 addition & 1 deletion starboard/linux/shared/platform_configuration/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ config("platform_configuration") {
"rt",
]

if (!sb_is_modular) {
if (!sb_is_modular || current_toolchain != cobalt_toolchain) {
ldflags += [ "-static-libstdc++" ]
}

Expand Down

0 comments on commit 0284300

Please sign in to comment.