Skip to content

Conversation

@derSteFfi
Copy link
Contributor

Fixes #211 and makes tcg compile for the first time on my machine

Stephan Bauroth and others added 2 commits July 18, 2025 15:01
Fixes daanx#211 and makes tcg compile for the first time on my machine
@jvoisin jvoisin merged commit ac42159 into daanx:master Jul 18, 2025
2 of 4 checks passed
@derSteFfi derSteFfi deleted the update_tcg branch July 18, 2025 14:19
derSteFfi added a commit to derSteFfi/mimalloc-bench that referenced this pull request Jul 18, 2025
Fixes daanx#211 and makes tcg compile for the first time on my machine

Co-authored-by: Stephan Bauroth <s.bauroth@tu-berlin.de>
derSteFfi added a commit to derSteFfi/mimalloc-bench that referenced this pull request Jul 18, 2025
Fixes daanx#211 and makes tcg compile for the first time on my machine

Co-authored-by: Stephan Bauroth <s.bauroth@tu-berlin.de>
@k-sareen
Copy link

k-sareen commented Oct 1, 2025

FYI after removing the sed/awk scripts, the tcg build command does not output a libtcmalloc.so, it outputs a libtcmalloc.lo, which does not work with LD_PRELOAD.

I believe the CI scripts currently not actually test tcg correctly as you can see here: https://github.com/daanx/mimalloc-bench/actions/runs/18081743181/job/51446049244#step:4:432.

I think the sed/awk scripts are still necessary, unfortunately.

@derSteFfi
Copy link
Contributor Author

you seem to be right: google/tcmalloc#262

That bench.sh does not realize this case is on my list, just wanted to have #246 merged first...

@Yasaswinig7
Copy link

Yasaswinig7 commented Oct 1, 2025

FYI, a shared library generated by adding a new rule in tcmalloc/BUILD (without modifying any other file with sed/awk) seems to be working (atleast for a small test).

file: tcmalloc/BUILD
cc_shared_library(
name = "tcmalloc_shared",
shared_lib_name = "libtcmalloc.so",
user_link_flags = ["-Wl,-soname,libtcmalloc.so"],
deps = [":tcmalloc"],
)

build cmd:
bazel build --copt "-flto" --linkopt "-flto=auto" //tcmalloc:tcmalloc_shared

unit test:
LD_PRELOAD=./bazel-bin/tcmalloc/libtcmalloc.so /bin/ls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tcg gawk hacks not idempotent

4 participants