Skip to content

Commit

Permalink
WIP changes
Browse files Browse the repository at this point in the history
  • Loading branch information
niranjanyardi committed Dec 4, 2024
1 parent 12d7bbf commit 5c6d164
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion build/config/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ group("common_deps") {
}

if (use_custom_libcxx) {
public_deps += [ "//buildtools/third_party/libc++" ]
public_deps += [ "//buildtools/third_party/libc++:cxx" ]
}

if (use_afl) {
Expand Down
1 change: 1 addition & 0 deletions build/config/c++/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ config("runtime_library") {
"-isystem" + rebase_path("$libcxx_prefix/include", root_build_dir),
"-isystem" + rebase_path("$libcxxabi_prefix/include", root_build_dir),
]
# print(cflags_cc, "cfalg_cc")

cflags_objcc = cflags_cc

Expand Down
2 changes: 1 addition & 1 deletion buildtools/third_party/libc++/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ config("cxx_config") {
include_dirs = [
"trunk/include",
"trunk/src",
"//buildtools/third_party/libc++abi/trunk/include",
"//buildtools/third_party/libc++abi/trunk/include/include",
]
}

Expand Down
2 changes: 1 addition & 1 deletion buildtools/third_party/libc++abi/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ config("cxxabi_config") {
]

include_dirs = [
"trunk/include",
"trunk/include/include",
"//buildtools/third_party/libc++/trunk/src",
]
}
Expand Down
3 changes: 3 additions & 0 deletions cobalt/build/configs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ config("cobalt_config") {
if (current_toolchain == starboard_toolchain) {
configs += [ "//${starboard_path}/platform_configuration" ]
}
if (current_toolchain == cobalt_toolchain && sb_is_modular) {
configs += [ "//starboard/build/config/modular/x64" ]
}

defines = [
"ENABLE_BUILDFLAG_IS_COBALT",
Expand Down
12 changes: 5 additions & 7 deletions starboard/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ if (!is_cobalt) {
"//starboard/tools:build_app_launcher_zip",
]
}

} else {
group("starboard_group") {
deps = []
public_deps = [
Expand All @@ -113,8 +113,10 @@ if (!is_cobalt) {
if (sb_is_modular && current_toolchain == cobalt_toolchain) {
public_deps += [
"//third_party/llvm-project/compiler-rt:compiler_rt",
"//third_party/llvm-project/libcxx:cxx",
"//third_party/llvm-project/libcxxabi:cxxabi",

# TODO: Talk about this with yavor/andrew
# "//third_party/llvm-project/libcxx:cxx",
# "//third_party/llvm-project/libcxxabi:cxxabi",
"//third_party/musl:c",
]

Expand Down Expand Up @@ -167,10 +169,6 @@ if (!is_cobalt) {
}
}
}
} else {
group("starboard_group") {
deps = [ "//starboard($starboard_toolchain)" ]
}
}

source_set("starboard_headers_only") {
Expand Down
12 changes: 7 additions & 5 deletions starboard/build/config/modular/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,21 @@ config("modular") {
"-ffunction-sections",
"-fdata-sections",
"-nostdlibinc",
"-isystem" + rebase_path("//third_party/llvm-project/libcxxabi/include",
root_build_dir),

# "-isystem" + rebase_path("//third_party/llvm-project/libcxxabi/include",
# root_build_dir),
"-isystem" + rebase_path("//third_party/llvm-project/libunwind/include",
root_build_dir),
"-isystem" + rebase_path("//third_party/llvm-project/libcxx/include",
root_build_dir),

# "-isystem" + rebase_path("//third_party/llvm-project/libcxx/include",
# root_build_dir),
"-isystem" + rebase_path("//third_party/musl/include", root_build_dir),
"-isystem" + rebase_path("//third_party/musl/arch/generic", root_build_dir),
]

cflags += [ "-fPIC" ]

cflags_cc = [ "-nostdinc++" ]
# cflags_cc = [ "-nostdinc++" ]

defines = [
# Ensure that the Starboardized __external_threading file is included.
Expand Down
2 changes: 2 additions & 0 deletions starboard/build/config/modular/x64/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ config("x64") {

cflags = [ "-isystem" +
rebase_path("//third_party/musl/arch/x86_64", root_build_dir) ]

ldflags = [ "-Wl,--gc-sections" ]
}
2 changes: 1 addition & 1 deletion third_party/llvm-project/compiler-rt/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ static_library("compiler_rt") {
}

configs += [ ":compiler_rt_config" ]
configs -= [ "//starboard/build/config:default_cpp_standard" ]
# configs -= [ "//starboard/build/config:default_cpp_standard" ]
}

0 comments on commit 5c6d164

Please sign in to comment.