Skip to content

Commit

Permalink
Test modular build.
Browse files Browse the repository at this point in the history
  • Loading branch information
y4vor committed Nov 21, 2024
1 parent 53b20c5 commit d6cb501
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion starboard/build/config/modular/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

config("modular") {
ldflags = []
ldflags = [ "-nostdlib" ]
cflags = [
"-ffunction-sections",
"-fdata-sections",
Expand Down
5 changes: 5 additions & 0 deletions starboard/nplb/posix_compliance/posix_string_scan_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
// Here we are not trying to do anything fancy, just to really sanity check that
// this is hooked up to something.

#include <stdlib.h>

#include "starboard/common/string.h"
#include "testing/gtest/include/gtest/gtest.h"

Expand Down Expand Up @@ -90,6 +92,9 @@ TEST(PosixStringScanTest, RainyDayIp3) {
EXPECT_EQ(0, in[3]);
}

TEST(PosixStringScanTest, TestGetEnv) {
SB_LOG(INFO) << getenv("PATH");
}
} // namespace
} // namespace nplb
} // namespace starboard
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@ int __abi_wrap_readdir_r(DIR* dirp,
int readdir_r(DIR* dirp, struct dirent* entry, struct dirent** result) {
return __abi_wrap_readdir_r(dirp, entry, result);
}

char* __abi_wrap_getenv(const char* name);

char* getenv(const char* name) {
return __abi_wrap_getenv(name);
}
}

0 comments on commit d6cb501

Please sign in to comment.