Skip to content

Commit

Permalink
Revert "Remove COBALT_LINUX macro" (youtube#3687)
Browse files Browse the repository at this point in the history
Reverts youtube#3644

Breaks an internal platform build.

b/150410605
  • Loading branch information
madhurajayaraman authored Jun 26, 2024
1 parent 2431d1b commit bf80b14
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 33 deletions.
4 changes: 4 additions & 0 deletions cobalt/script/standalone_javascript_runner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ StandaloneJavascriptRunner::StandaloneJavascriptRunner(
}

bool StandaloneJavascriptRunner::RunInteractive() {
#if defined(COBALT_LINUX)
if (!std::cin.eof() && std::cin.good()) {
// Interactive prompt.
std::cout << "> ";
Expand All @@ -54,6 +55,9 @@ bool StandaloneJavascriptRunner::RunInteractive() {
}
return true;
}
#else
NOTIMPLEMENTED();
#endif
return false;
}

Expand Down
3 changes: 3 additions & 0 deletions starboard/android/shared/platform_configuration/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ config("platform_configuration") {
# -DANDROID is an argument to some ifdefs in the NDK"s eglplatform.h
"ANDROID",

# Cobalt on Linux flag
"COBALT_LINUX",

# So that we get the PRI* macros from inttypes.h
"__STDC_FORMAT_MACROS",

Expand Down
1 change: 1 addition & 0 deletions starboard/linux/shared/platform_configuration/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ config("platform_configuration") {
defines += [
# Defined to get format macro constants from <inttypes.h>.
"__STDC_FORMAT_MACROS",
"COBALT_LINUX",

# Enable GNU extensions to get prototypes like ffsl.
"_GNU_SOURCE=1",
Expand Down
5 changes: 1 addition & 4 deletions starboard/linux/x64x11/clang/3.9/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
static_library("starboard_platform") {
check_includes = false

sources = [
"//starboard/linux/x64x11/iostreams_workaround.cc",
"//starboard/linux/x64x11/run_starboard_main.cc",
]
sources = [ "//starboard/linux/x64x11/run_starboard_main.cc" ]
if (!sb_is_modular || sb_is_evergreen) {
sources += [ "//starboard/linux/x64x11/main.cc" ]
}
Expand Down
5 changes: 1 addition & 4 deletions starboard/linux/x64x11/gcc/6.3/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
static_library("starboard_platform") {
check_includes = false

sources = [
"//starboard/linux/x64x11/iostreams_workaround.cc",
"//starboard/linux/x64x11/run_starboard_main.cc",
]
sources = [ "//starboard/linux/x64x11/run_starboard_main.cc" ]
if (!sb_is_modular || sb_is_evergreen) {
sources += [ "//starboard/linux/x64x11/main.cc" ]
}
Expand Down
2 changes: 2 additions & 0 deletions starboard/linux/x64x11/gcc/6.3/starboard_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <stdio.h>
#include "starboard/event.h"

int main(int argc, char** argv) {
printf("starboard_loader: SbRunStarboardMain\n");
return SbRunStarboardMain(argc, argv, SbEventHandle);
}
25 changes: 0 additions & 25 deletions starboard/linux/x64x11/iostreams_workaround.cc

This file was deleted.

1 change: 1 addition & 0 deletions starboard/raspi/shared/platform_configuration/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ config("compiler_flags") {

defines += [
# Cobalt on Linux flag
"COBALT_LINUX",
"__STDC_FORMAT_MACROS", # so that we get PRI*
"_GNU_SOURCE=1",
]
Expand Down

0 comments on commit bf80b14

Please sign in to comment.