diff --git a/.github/config/raspi-2-modular.json b/.github/config/raspi-2-modular.json deleted file mode 100644 index b9a40a772c89..000000000000 --- a/.github/config/raspi-2-modular.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "docker_service": "build-raspi", - "on_device_test": { - "enabled": true, - "tests": [ - "0", - "1", - "2", - "3", - "4", - "5" - ], - "test_attempts": 2 - }, - "platforms": [ - "raspi-2-modular" - ], - "includes": [ - { - "name":"modular", - "platform":"raspi-2-modular", - "target_platform":"raspi-2", - "target_cpu":"target_cpu=\\\"arm\\\"", - "extra_gn_arguments": "build_with_separate_cobalt_toolchain=true use_asan=false", - "dimension": "release_version=regex:10.*" - } - ] -} diff --git a/.github/config/raspi-2-skia.json b/.github/config/raspi-2-skia.json index f99fb737dcca..e83ea1fa8577 100644 --- a/.github/config/raspi-2-skia.json +++ b/.github/config/raspi-2-skia.json @@ -9,7 +9,7 @@ "platform":"raspi-2-skia", "target_platform":"raspi-2-skia", "target_cpu":"target_cpu=\\\"arm\\\"", - "extra_gn_arguments": "is_clang=false" + "extra_gn_arguments": "build_with_separate_cobalt_toolchain=true use_asan=false" } ] } diff --git a/.github/config/raspi-2.json b/.github/config/raspi-2.json index ab2a1e654865..9008437612cb 100644 --- a/.github/config/raspi-2.json +++ b/.github/config/raspi-2.json @@ -14,8 +14,6 @@ }, "platforms": [ "raspi-2", - "raspi-2-sbversion-13", - "raspi-2-sbversion-14", "raspi-2-sbversion-15" ], "includes": [ @@ -24,25 +22,7 @@ "platform":"raspi-2", "target_platform":"raspi-2", "target_cpu":"target_cpu=\\\"arm\\\"", - "extra_gn_arguments": "is_clang=false", - "dimension": "release_version=regex:10.*" - }, - { - "name":"sbversion-13", - "platform":"raspi-2-sbversion-13", - "target_platform":"raspi-2", - "target_cpu":"target_cpu=\\\"arm\\\"", - "extra_gn_arguments":"is_clang=false", - "sb_api_version": "sb_api_version=13", - "dimension": "release_version=regex:10.*" - }, - { - "name":"sbversion-14", - "platform":"raspi-2-sbversion-14", - "target_platform":"raspi-2", - "target_cpu":"target_cpu=\\\"arm\\\"", - "extra_gn_arguments":"is_clang=false", - "sb_api_version": "sb_api_version=14", + "extra_gn_arguments": "build_with_separate_cobalt_toolchain=true use_asan=false", "dimension": "release_version=regex:10.*" }, { @@ -50,7 +30,7 @@ "platform":"raspi-2-sbversion-15", "target_platform":"raspi-2", "target_cpu":"target_cpu=\\\"arm\\\"", - "extra_gn_arguments":"is_clang=false", + "extra_gn_arguments": "build_with_separate_cobalt_toolchain=true use_asan=false", "sb_api_version": "sb_api_version=15", "dimension": "release_version=regex:10.*" } diff --git a/.github/workflows/raspi-2.yaml b/.github/workflows/raspi-2.yaml index 7dcabed5d32a..ac42ac8cfeb8 100644 --- a/.github/workflows/raspi-2.yaml +++ b/.github/workflows/raspi-2.yaml @@ -38,12 +38,3 @@ jobs: with: platform: raspi-2-skia nightly: ${{ github.event.inputs.nightly }} - raspi-2-modular: - uses: ./.github/workflows/main.yaml - permissions: - packages: write - pull-requests: write - with: - platform: raspi-2-modular - nightly: ${{ github.event.inputs.nightly }} - modular: true diff --git a/starboard/raspi/2/args.gn b/starboard/raspi/2/args.gn index 0b190f800347..9c2977749c07 100644 --- a/starboard/raspi/2/args.gn +++ b/starboard/raspi/2/args.gn @@ -15,4 +15,5 @@ target_platform = "raspi-2" target_os = "linux" target_cpu = "arm" -is_clang = false +build_with_separate_cobalt_toolchain = true +use_asan = false diff --git a/starboard/raspi/2/skia/BUILD.gn b/starboard/raspi/2/skia/BUILD.gn index bcb5b924184d..80f549ca1011 100644 --- a/starboard/raspi/2/skia/BUILD.gn +++ b/starboard/raspi/2/skia/BUILD.gn @@ -22,3 +22,9 @@ static_library("starboard_platform") { configs += [ "//starboard/build/config:starboard_implementation" ] public_deps = [ "//starboard/raspi/shared:starboard_platform" ] } + +if (build_with_separate_cobalt_toolchain) { + group("starboard_platform_with_main") { + deps = [ "//starboard/raspi/2:starboard_platform_with_main" ] + } +} diff --git a/starboard/raspi/2/skia/starboard_loader.cc b/starboard/raspi/2/skia/starboard_loader.cc new file mode 100644 index 000000000000..065bfaa07123 --- /dev/null +++ b/starboard/raspi/2/skia/starboard_loader.cc @@ -0,0 +1,19 @@ +// Copyright 2023 The Cobalt Authors. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "starboard/event.h" + +int main(int argc, char** argv) { + return SbRunStarboardMain(argc, argv, SbEventHandle); +} diff --git a/starboard/raspi/2/skia/toolchain/BUILD.gn b/starboard/raspi/2/skia/toolchain/BUILD.gn index 3fa9a349b184..8524670452e2 100644 --- a/starboard/raspi/2/skia/toolchain/BUILD.gn +++ b/starboard/raspi/2/skia/toolchain/BUILD.gn @@ -14,6 +14,7 @@ import("//build/config/clang/clang.gni") import("//build/toolchain/gcc_toolchain.gni") +import("//starboard/build/toolchain/cobalt_toolchains.gni") import("//starboard/raspi/shared/toolchain/raspi_shared_toolchain.gni") gcc_toolchain("target") { @@ -29,3 +30,23 @@ gcc_toolchain("target") { is_clang = false } } + +cobalt_clang_toolchain("cobalt") { + variables = { + native_linker_path = gcc_toolchain_cxx + } +} + +gcc_toolchain("starboard") { + cc = gcc_toolchain_cc + cxx = gcc_toolchain_cxx + ld = cxx + + ar = gcc_toolchain_ar + + tail_lib_dependencies = "-l:libpthread.so.0 -l:libdl.so.2" + + toolchain_args = { + is_clang = false + } +} diff --git a/starboard/raspi/shared/launcher.py b/starboard/raspi/shared/launcher.py index 9010198da22a..cb5a376b045f 100644 --- a/starboard/raspi/shared/launcher.py +++ b/starboard/raspi/shared/launcher.py @@ -29,8 +29,6 @@ from starboard.tools import abstract_launcher from starboard.shared import retry -IS_MODULAR_BUILD = os.getenv('MODULAR_BUILD', '0') == '1' - class TargetPathError(ValueError): pass @@ -146,9 +144,9 @@ def _GetAndCheckTestFile(self, target_name): def _GetAndCheckTestFileWithFallback(self): try: return self._GetAndCheckTestFile(self.target_name + '_loader') - except TargetPathError as e: - if IS_MODULAR_BUILD: - raise e + except TargetPathError: + # For starboard level test targets like player_filter_tests built as an + # executable, return the target name. return self._GetAndCheckTestFile(self.target_name) def _InitPexpectCommands(self): diff --git a/starboard/raspi/shared/test_filters.py b/starboard/raspi/shared/test_filters.py index d6aeb5549d06..21a428f06ec2 100644 --- a/starboard/raspi/shared/test_filters.py +++ b/starboard/raspi/shared/test_filters.py @@ -13,21 +13,9 @@ # limitations under the License. """Starboard Raspberry Pi Platform Test Filters.""" -import os from starboard.tools.testing import test_filter # pylint: disable=line-too-long -_MODULAR_BUILD_FILTERED_TESTS = { - 'nplb': [ - 'SbSystemGetStackTest.SunnyDayStackDirection', - 'SbSystemGetStackTest.SunnyDay', - 'SbSystemGetStackTest.SunnyDayShortStack', - 'SbSystemSymbolizeTest.SunnyDay' - 'MemoryReportingTest.CapturesOperatorDeleteNothrow', - 'SbAudioSinkTest.*', 'SbDrmTest.AnySupportedKeySystems' - ], - 'player_filter_tests': [test_filter.FILTER_ALL], -} _FILTERED_TESTS = { 'nplb': [ @@ -62,8 +50,6 @@ 'PlayerComponentsTests/PlayerComponentsTest.*', ], } -if os.getenv('MODULAR_BUILD', '0') == '1': - _FILTERED_TESTS = _MODULAR_BUILD_FILTERED_TESTS class TestFilters(object):