Skip to content

Commit

Permalink
remove lto clang override (#254)
Browse files Browse the repository at this point in the history
tcmalloc doesn't build with clang-15 because it matches compiler
against "clang" string and decides it is being built by gcc.
(you can argue it is bazel's problem)

There's no better way but to symlink /usr/bin/clang and clang++
to recent clang version.
  • Loading branch information
mikea authored Jan 9, 2023
1 parent 9daf530 commit 2ed6f28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 1 addition & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ build --cxxopt='-Wno-ignored-qualifiers' --host_cxxopt='-Wno-ignored-qualifiers'
build --cxxopt='-Wno-ambiguous-reversed-operator' --host_cxxopt='-Wno-ambiguous-reversed-operator'


# optimized LTO build
# You'll need the following packages installed: clang-15 libc++-15-dev libc++abi-15-dev
build:thin-lto --action_env=BAZEL_COMPILER=clang-15
build:thin-lto --action_env=CC=clang-15
build:thin-lto --action_env=CXX=clang++-15
# optimized LTO build. you'll need a fairly recent clang for this to work
build:thin-lto -c opt
build:thin-lto --cxxopt='-flto=thin'
build:thin-lto --linkopt='-flto=thin'
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ bazel clean --expunge

The cache will now be cleaned and you can try building again.

#### Thin LTO build

If you have clang-15 and libc++-15 packages installed you can build a higher performant release
If you have a fairly recent clang packages installed you can build a more performant release
version of workerd:

```
Expand Down

0 comments on commit 2ed6f28

Please sign in to comment.