Skip to content

Commit

Permalink
Enable function and data sections
Browse files Browse the repository at this point in the history
  • Loading branch information
dzbarsky committed Oct 10, 2023
1 parent 9224377 commit 32e3bcd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ build --features=thin_lto
# ThinLTO feature doesn't exist in Zig toolchain, so we must set the flags manually.
# It also doesn't support LTO on darwin targets, so we can't set this globally.
# Instead, we configure copt/linkopt inside the toolchain itself (with a WORKSPACE patch).
#build --copt -flto=thin

# Compilation Flags
build -c opt
build --strip=always
build --copt -ffunction-sections
build --copt -fdata-sections
5 changes: 4 additions & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ pkg_files(
)

# These are no needed for a minimal distribution.
# TODO(zbarsky): We don't really need to build minimal distribution, the compressed size it the same.
# Keeping this support for now since it will be useful when building additional tools outside the core distribution like clang-tidy, etc.
TIER2_BINS = [
"llvm-cov",
"llvm-dwp",
Expand Down Expand Up @@ -77,7 +79,8 @@ PLATFORMS = [
name = "for_" + platform.split(":")[1],
srcs = [
":dist",
":dist_minimal",
# The minimal dist is the same size compressed as the normal one.
# ":dist_minimal",
],
target_platform = platform,
)
Expand Down
4 changes: 3 additions & 1 deletion rbe_platform/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ platform(
"@bazel_tools//tools/cpp:clang",
],
exec_properties = {
"container-image": "docker://l.gcr.io/google/rbe-ubuntu16-04@sha256:f6568d8168b14aafd1b707019927a63c2d37113a03bcee188218f99bd0327ea1",
# Buildbuddy guarantees they pre-cache this image.
"container-image": "docker://gcr.io/flame-public/executor-docker-default:latest",
#"container-image": "docker://l.gcr.io/google/rbe-ubuntu16-04@sha256:f6568d8168b14aafd1b707019927a63c2d37113a03bcee188218f99bd0327ea1",
"OSFamily": "Linux",
},
)

0 comments on commit 32e3bcd

Please sign in to comment.