Skip to content

Commit

Permalink
Update trunk to Starboard 17 (#3884)
Browse files Browse the repository at this point in the history
b/355449840
  • Loading branch information
madhurajayaraman authored Jul 31, 2024
1 parent c38dd34 commit 1f7d8a5
Show file tree
Hide file tree
Showing 11 changed files with 413 additions and 2 deletions.
2 changes: 1 addition & 1 deletion starboard/build/config/base_configuration.gni
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ declare_args() {

# The Starboard API version of the current build configuration. The default
# value is meant to be overridden by a Starboard ABI file.
sb_api_version = 16
sb_api_version = 17

# Enables embedding Cobalt as a shared library within another app. This
# requires a 'lib' starboard implementation for the corresponding platform.
Expand Down
2 changes: 1 addition & 1 deletion starboard/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

// The maximum API version allowed by this version of the Starboard headers,
// inclusive. The API version is not stable and is open for changes.
#define SB_MAXIMUM_API_VERSION 16
#define SB_MAXIMUM_API_VERSION 17

// --- Common Detected Features ----------------------------------------------

Expand Down
4 changes: 4 additions & 0 deletions starboard/linux/x64x11/system_get_property_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ const char kModelName[] = "ModelName";
const char kPlatformName[] = "X11; Linux x86_64";
const char kSystemIntegratorName[] = "SystemIntegratorName";

#if SB_API_VERSION == 17
const char kModelYear[] = "2026";
#endif // SB_API_VERSION == 17

#if SB_API_VERSION == 16
const char kModelYear[] = "2025";
#endif // SB_API_VERSION == 16
Expand Down
49 changes: 49 additions & 0 deletions starboard/nplb/nplb_evergreen_compat_tests/sabi_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,55 @@ const char* kSabiJsonIdX64Sysv =
"\"target_arch\":\"x64\",\"target_arch_sub\":\"\",\"word_size\":64}";
#endif // SB_API_VERSION == 16

#if SB_API_VERSION == 17
const char* kSabiJsonIdArmHardfp =
"{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4,"
"\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":4,"
"\"alignment_pointer\":4,\"alignment_short\":2,\"calling_convention\":"
"\"eabi\",\"endianness\":\"little\",\"floating_point_abi\":\"hard\","
"\"floating_point_fpu\":\"vfpv3\",\"sb_api_version\":17,\"signedness_of_"
"char\":\"signed\",\"signedness_of_enum\":\"signed\",\"size_of_char\":1,"
"\"size_of_double\":8,\"size_of_enum\":4,\"size_of_float\":4,\"size_of_"
"int\":4,\"size_of_llong\":8,\"size_of_long\":4,\"size_of_pointer\":4,"
"\"size_of_short\":2,\"target_arch\":\"arm\",\"target_arch_sub\":\"v7a\","
"\"word_size\":32}";

const char* kSabiJsonIdArmSoftfp =
"{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4,"
"\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":4,"
"\"alignment_pointer\":4,\"alignment_short\":2,\"calling_convention\":"
"\"eabi\",\"endianness\":\"little\",\"floating_point_abi\":\"softfp\","
"\"floating_point_fpu\":\"vfpv3\",\"sb_api_version\":17,\"signedness_of_"
"char\":\"signed\",\"signedness_of_enum\":\"signed\",\"size_of_char\":1,"
"\"size_of_double\":8,\"size_of_enum\":4,\"size_of_float\":4,\"size_of_"
"int\":4,\"size_of_llong\":8,\"size_of_long\":4,\"size_of_pointer\":4,"
"\"size_of_short\":2,\"target_arch\":\"arm\",\"target_arch_sub\":\"v7a\","
"\"word_size\":32}";

const char* kSabiJsonIdArm64 =
"{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4,"
"\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":8,"
"\"alignment_pointer\":8,\"alignment_short\":2,\"calling_convention\":"
"\"aarch64\",\"endianness\":\"little\",\"floating_point_abi\":\"\","
"\"floating_point_fpu\":\"\",\"sb_api_version\":17,\"signedness_of_char\":"
"\"signed\",\"signedness_of_enum\":\"signed\",\"size_of_char\":1,\"size_of_"
"double\":8,\"size_of_enum\":4,\"size_of_float\":4,\"size_of_int\":4,"
"\"size_of_llong\":8,\"size_of_long\":8,\"size_of_pointer\":8,\"size_of_"
"short\":2,\"target_arch\":\"arm64\",\"target_arch_sub\":\"v8a\",\"word_"
"size\":64}";

const char* kSabiJsonIdX64Sysv =
"{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4,"
"\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":8,"
"\"alignment_pointer\":8,\"alignment_short\":2,\"calling_convention\":"
"\"sysv\",\"endianness\":\"little\",\"floating_point_abi\":\"\",\"floating_"
"point_fpu\":\"\",\"sb_api_version\":17,\"signedness_of_char\":\"signed\","
"\"signedness_of_enum\":\"signed\",\"size_of_char\":1,\"size_of_double\":8,"
"\"size_of_enum\":4,\"size_of_float\":4,\"size_of_int\":4,\"size_of_"
"llong\":8,\"size_of_long\":8,\"size_of_pointer\":8,\"size_of_short\":2,"
"\"target_arch\":\"x64\",\"target_arch_sub\":\"\",\"word_size\":64}";
#endif // SB_API_VERSION == 17

class SabiTest : public ::testing::Test {
protected:
SabiTest() {}
Expand Down
31 changes: 31 additions & 0 deletions starboard/sabi/arm/hardfp/sabi-v17.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"variables": {
"sb_api_version": 17,
"target_arch": "arm",
"target_arch_sub": "v7a",
"word_size": 32,
"endianness": "little",
"calling_convention": "eabi",
"floating_point_abi": "hard",
"floating_point_fpu": "vfpv3",
"signedness_of_char": "signed",
"signedness_of_enum": "signed",
"alignment_char": 1,
"alignment_double": 8,
"alignment_float": 4,
"alignment_int": 4,
"alignment_llong": 8,
"alignment_long": 4,
"alignment_pointer": 4,
"alignment_short": 2,
"size_of_char": 1,
"size_of_double": 8,
"size_of_enum": 4,
"size_of_float": 4,
"size_of_int": 4,
"size_of_llong": 8,
"size_of_long": 4,
"size_of_pointer": 4,
"size_of_short": 2
}
}
31 changes: 31 additions & 0 deletions starboard/sabi/arm/softfp/sabi-v17.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"variables": {
"sb_api_version": 17,
"target_arch": "arm",
"target_arch_sub": "v7a",
"word_size": 32,
"endianness": "little",
"calling_convention": "eabi",
"floating_point_abi": "softfp",
"floating_point_fpu": "vfpv3",
"signedness_of_char": "signed",
"signedness_of_enum": "signed",
"alignment_char": 1,
"alignment_double": 8,
"alignment_float": 4,
"alignment_int": 4,
"alignment_llong": 8,
"alignment_long": 4,
"alignment_pointer": 4,
"alignment_short": 2,
"size_of_char": 1,
"size_of_double": 8,
"size_of_enum": 4,
"size_of_float": 4,
"size_of_int": 4,
"size_of_llong": 8,
"size_of_long": 4,
"size_of_pointer": 4,
"size_of_short": 2
}
}
31 changes: 31 additions & 0 deletions starboard/sabi/arm64/sabi-v17.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"variables": {
"sb_api_version": 17,
"target_arch": "arm64",
"target_arch_sub": "v8a",
"word_size": 64,
"endianness": "little",
"calling_convention": "aarch64",
"floating_point_abi": "",
"floating_point_fpu": "",
"signedness_of_char": "signed",
"signedness_of_enum": "signed",
"alignment_char": 1,
"alignment_double": 8,
"alignment_float": 4,
"alignment_int": 4,
"alignment_llong": 8,
"alignment_long": 8,
"alignment_pointer": 8,
"alignment_short": 2,
"size_of_char": 1,
"size_of_double": 8,
"size_of_enum": 4,
"size_of_float": 4,
"size_of_int": 4,
"size_of_llong": 8,
"size_of_long": 8,
"size_of_pointer": 8,
"size_of_short": 2
}
}
172 changes: 172 additions & 0 deletions starboard/sabi/schema/sabi-v17.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
{
"title": "Starboard ABI Schema",
"description": "This schema validates that a Starboard ABI file contains the required keys, no extras, and that the corresponding values are valid.",
"type": "object",
"properties": {
"sb_api_version": {
"type": "integer",
"description": "The Starboard API version.",
"enum": [17]
},
"target_arch": {
"type": "string",
"description": "The targeted architecture.",
"enum": ["arm", "arm64", "x86", "x64"]
},
"target_arch_sub": {
"type": "string",
"description": "The targeted sub-architecture.",
"enum": ["v7a", "v8a", ""]
},
"word_size": {
"type": "integer",
"description": "The word size.",
"enum": [32, 64]
},
"endianness": {
"type": "string",
"description": "The endianness.",
"enum": ["big", "little"]
},
"calling_convention": {
"type": "string",
"description": "The calling convention.",
"enum": ["sysv", "eabi", "windows", "aarch64"]
},
"floating_point_abi": {
"type": "string",
"description": "The floating-point ABI.",
"enum": ["hard", "softfp", ""]
},
"floating_point_fpu": {
"type": "string",
"description": "The floating-point hardware, if available.",
"enum": ["vfpv2", "vfpv3", ""]
},
"signedness_of_char": {
"type": "string",
"description": "The signedness of the 'char' data type.",
"enum": ["signed", "unsigned"]
},
"signedness_of_enum": {
"type": "string",
"description": "The signedness of the 'enum' data type.",
"enum": ["signed", "unsigned"]
},
"alignment_char": {
"type": "integer",
"description": "The alignment of the 'char' data type.",
"enum": [1]
},
"alignment_double": {
"type": "integer",
"description": "The alignment of the 'double' data type.",
"enum": [8]
},
"alignment_float": {
"type": "integer",
"description": "The alignment of the 'float' data type.",
"enum": [4]
},
"alignment_int": {
"type": "integer",
"description": "The alignment of the 'int' data type.",
"enum": [4]
},
"alignment_llong": {
"type": "integer",
"description": "The alignment of the 'long long' data type.",
"enum": [8]
},
"alignment_long": {
"type": "integer",
"description": "The alignment of the 'long' data type.",
"enum": [4, 8]
},
"alignment_pointer": {
"type": "integer",
"description": "The alignment of pointers.",
"enum": [4, 8]
},
"alignment_short": {
"type": "integer",
"description": "The alignment of the 'short' data type.",
"enum": [2]
},
"size_of_char": {
"type": "integer",
"description": "The size of the 'char' data type.",
"enum": [1]
},
"size_of_double": {
"type": "integer",
"description": "The size of the 'double' data type.",
"enum": [8]
},
"size_of_enum": {
"type": "integer",
"description": "The size of the 'enum' data type.",
"enum": [4]
},
"size_of_float": {
"type": "integer",
"description": "The size of the 'float' data type.",
"enum": [4]
},
"size_of_int": {
"type": "integer",
"description": "The size of the 'int' data type.",
"enum": [4]
},
"size_of_llong": {
"type": "integer",
"description": "The size of the 'long long' data type.",
"enum": [8]
},
"size_of_long": {
"type": "integer",
"description": "The size of the 'long' data type.",
"enum": [4, 8]
},
"size_of_pointer": {
"type": "integer",
"description": "The size of pointers.",
"enum": [4, 8]
},
"size_of_short": {
"type": "integer",
"description": "The size of the 'short' data type.",
"enum": [2]
}
},
"required": [
"sb_api_version",
"target_arch",
"target_arch_sub",
"word_size",
"endianness",
"calling_convention",
"floating_point_abi",
"floating_point_fpu",
"signedness_of_char",
"signedness_of_enum",
"alignment_char",
"alignment_double",
"alignment_float",
"alignment_int",
"alignment_llong",
"alignment_long",
"alignment_pointer",
"alignment_short",
"size_of_char",
"size_of_enum",
"size_of_double",
"size_of_float",
"size_of_int",
"size_of_llong",
"size_of_long",
"size_of_pointer",
"size_of_short"
],
"additionalProperties": false
}
31 changes: 31 additions & 0 deletions starboard/sabi/x64/sysv/sabi-v17.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"variables": {
"sb_api_version": 17,
"target_arch": "x64",
"target_arch_sub": "",
"word_size": 64,
"endianness": "little",
"calling_convention": "sysv",
"floating_point_abi": "",
"floating_point_fpu": "",
"signedness_of_char": "signed",
"signedness_of_enum": "signed",
"alignment_char": 1,
"alignment_double": 8,
"alignment_float": 4,
"alignment_int": 4,
"alignment_llong": 8,
"alignment_long": 8,
"alignment_pointer": 8,
"alignment_short": 2,
"size_of_char": 1,
"size_of_double": 8,
"size_of_enum": 4,
"size_of_float": 4,
"size_of_int": 4,
"size_of_llong": 8,
"size_of_long": 8,
"size_of_pointer": 8,
"size_of_short": 2
}
}
Loading

0 comments on commit 1f7d8a5

Please sign in to comment.