Skip to content
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 evergreen platform tests to use starboard toolchain #2190

Merged
merged 8 commits into from
Jan 10, 2024
20 changes: 14 additions & 6 deletions starboard/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,19 @@ group("gn_all") {
deps += [ "//third_party/lz4_lib:lz4" ]

if (sb_is_evergreen_compatible) {
deps += [ "//third_party/crashpad/client" ]
data_deps = [
"//starboard/loader_app($starboard_toolchain)",
"//third_party/crashpad/handler:crashpad_handler(//$starboard_path/toolchain:native_target)",
"//third_party/crashpad/tools:crashpad_database_util(//$starboard_path/toolchain:native_target)",
deps += [
"//starboard/elf_loader:elf_loader_test_install($starboard_toolchain)",
"//starboard/loader_app:slot_management_test_install($starboard_toolchain)",
]

if (current_toolchain == starboard_toolchain) {
deps += [ "//third_party/crashpad/client" ]
data_deps = [
"//starboard/loader_app($starboard_toolchain)",
"//third_party/crashpad/handler:crashpad_handler(//$starboard_path/toolchain:native_target)",
"//third_party/crashpad/tools:crashpad_database_util(//$starboard_path/toolchain:native_target)",
]
}
}
}
}
Expand Down Expand Up @@ -120,7 +127,8 @@ group("starboard_group") {
]

if (!sb_is_modular || sb_is_evergreen) {
if (sb_is_evergreen_compatible) {
if (sb_is_evergreen_compatible &&
current_toolchain == starboard_toolchain) {
public_deps += [ "//third_party/crashpad/wrapper" ]
} else {
public_deps += [ "//third_party/crashpad/wrapper:wrapper_stub" ]
Expand Down
2 changes: 1 addition & 1 deletion starboard/android/shared/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ static_library("starboard_platform") {
"//third_party/opus",
]

if (sb_is_evergreen_compatible) {
if (sb_is_evergreen_compatible && current_toolchain == starboard_toolchain) {
sources -= [
"crash_handler.cc",
"crash_handler.h",
Expand Down
3 changes: 2 additions & 1 deletion starboard/build/config/starboard_target_type.gni
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ template("starboard_platform_target") {
"//starboard/common",
"//starboard/egl_and_gles",
]
if (sb_is_evergreen_compatible) {
if (sb_is_evergreen_compatible &&
current_toolchain == starboard_toolchain) {
public_deps += [ "//third_party/crashpad/wrapper" ]
} else {
public_deps += [ "//third_party/crashpad/wrapper:wrapper_stub" ]
Expand Down
23 changes: 8 additions & 15 deletions starboard/elf_loader/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static_library("elf_loader") {
]
}

if (sb_is_evergreen_compatible) {
if (sb_is_evergreen_compatible && current_toolchain == starboard_toolchain) {
static_library("elf_loader_sys") {
# System loader based on dlopen/dlsym.
# Should be used only for debugging/troubleshooting.
Expand All @@ -82,13 +82,8 @@ if (sb_is_evergreen_compatible) {
"//starboard:starboard_group",
"//starboard/common",
"//starboard/shared/modular:posix_time_wrappers",
"//third_party/crashpad/wrapper",
]

if (sb_is_evergreen_compatible) {
deps += [ "//third_party/crashpad/wrapper" ]
} else {
deps += [ "//third_party/crashpad/wrapper:wrapper_stub" ]
}
}
}

Expand Down Expand Up @@ -126,7 +121,7 @@ if (current_toolchain == starboard_toolchain && !is_host_win) {
}
}

if (sb_is_evergreen_compatible) {
if (sb_is_evergreen_compatible && current_toolchain == starboard_toolchain) {
target(final_executable_type, "elf_loader_sys_sandbox") {
# To properly function the system loader requires the starboard
# symbols to be exported from the binary.
Expand All @@ -153,20 +148,18 @@ if (sb_is_evergreen_compatible) {
":sabi_string",
"//starboard:starboard_group",
]

if (!sb_is_evergreen_compatible) {
deps += [ "//third_party/crashpad/wrapper:wrapper_stub" ]
}
}
}

# TODO: b/309493306 - Stop building evergreen targets for all non-evergreen platforms.
if (!is_host_win) {
target(gtest_target_type, "elf_loader_test") {
if (current_toolchain == starboard_toolchain && !is_host_win) {
target(starboard_level_gtest_target_type, "elf_loader_test") {
niranjanyardi marked this conversation as resolved.
Show resolved Hide resolved
testonly = true
build_loader = false

sources = [ "//starboard/common/test_main.cc" ]
deps = [
"//starboard:starboard_group",
"//starboard:starboard_with_main",
"//testing/gmock",
"//testing/gtest",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ if (current_toolchain == default_toolchain &&
} else {
import("//starboard/linux/shared/platform_configuration/configuration.gni")

sb_is_evergreen_compatible = true
sb_evergreen_compatible_use_libunwind = true

sabi_path = "//starboard/sabi/x64/sysv/sabi-v$sb_api_version.json"
}

sb_is_evergreen_compatible = true
18 changes: 11 additions & 7 deletions starboard/loader_app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ group("common_loader_app_dependencies") {
"//starboard/elf_loader:sabi_string",
]

if (sb_is_evergreen_compatible) {
if (sb_is_evergreen_compatible && current_toolchain == starboard_toolchain) {
public_deps += [ "//third_party/crashpad/wrapper" ]
} else {
public_deps += [ "//third_party/crashpad/wrapper:wrapper_stub" ]
}
}

if (sb_is_evergreen_compatible && sb_evergreen_compatible_package) {
if (sb_is_evergreen_compatible && sb_evergreen_compatible_package &&
current_toolchain == starboard_toolchain) {
copy("copy_loader_app_content") {
install_content = true
if (target_cpu == "arm" && arm_float_abi == "softfp") {
Expand Down Expand Up @@ -119,9 +120,9 @@ if (current_toolchain == starboard_toolchain) {
not_needed([ "_common_loader_app_sources" ])
}

if (sb_is_evergreen_compatible) {
if (sb_is_evergreen_compatible && current_toolchain == starboard_toolchain) {
# TODO: b/261635039 enable this target on Android
target(final_executable_type, "loader_app_sys") {
target(starboard_level_final_executable_type, "loader_app_sys") {
if ((target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm" ||
target_cpu == "arm64") && target_os != "android") {
sources = _common_loader_app_sources
Expand Down Expand Up @@ -271,17 +272,19 @@ static_library("slot_management") {
"//starboard/elf_loader:sabi_string",
]

if (sb_is_evergreen_compatible) {
if (sb_is_evergreen_compatible && current_toolchain == starboard_toolchain) {
deps += [ "//third_party/crashpad/wrapper" ]
} else {
deps += [ "//third_party/crashpad/wrapper:wrapper_stub" ]
}
}

# TODO: b/309493306 - Stop building evergreen targets for all non-evergreen platforms.
if (!is_host_win) {
target(gtest_target_type, "slot_management_test") {
if (current_toolchain == starboard_toolchain && !is_host_win) {
target(starboard_level_gtest_target_type, "slot_management_test") {
testonly = true
build_loader = false

sources = [
"//starboard/common/test_main.cc",
"slot_management_test.cc",
Expand All @@ -292,6 +295,7 @@ if (!is_host_win) {
":installation_manager",
":installation_store_proto",
":slot_management",
"//starboard:starboard_with_main",
"//starboard/elf_loader:sabi_string",
"//testing/gmock",
"//testing/gtest",
Expand Down
3 changes: 2 additions & 1 deletion starboard/raspi/2/platform_configuration/configuration.gni
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ if (current_toolchain != default_toolchain ||
arm_float_abi = "hard"

sb_evergreen_compatible_use_libunwind = true
sb_is_evergreen_compatible = true
}

sb_is_evergreen_compatible = true

if (!build_with_separate_cobalt_toolchain) {
separate_install_targets_for_bundling = true
}
2 changes: 1 addition & 1 deletion third_party/crashpad/wrapper/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# depend on this common target, and not any of the specific "starboard_platform"
# targets.

if (sb_is_evergreen_compatible) {
if (sb_is_evergreen_compatible && current_toolchain == starboard_toolchain) {
static_library("wrapper") {
check_includes = false

Expand Down
Loading