Skip to content

Rework ELF symbol decompression enablement - #51

Open
illwieckz wants to merge 3 commits into
masterfrom
illwieckz/elf-compression
Open

illwieckz wants to merge 3 commits into
masterfrom
illwieckz/elf-compression

Conversation

@illwieckz

Copy link
Copy Markdown
Member

So before this PR,

  • by default zlib was enabled, without any option to disable it.
  • by default zstd was disabled, with an option to enable it.

We may not need zlib, we did not need it before, so we may want to be able to disable it:

When adding an option disable zlib, I would prefer that both zlib and zstd related options to be similar not confusing, so basically, not having one being enabled by default with a --disable option while the other is disabled by default with a --enable option.

So configure now enables both zlib and zstd by default but provides --disable-zlib and --disable-zstd options.

Picked from:

@illwieckz illwieckz changed the title Rework ELF symbold decompression enablement Rework ELF symbol decompression enablement Oct 20, 2026
@slipher

slipher commented Oct 20, 2026

Copy link
Copy Markdown
Member

Optional zlib support in the headers and in the autoconf script should be a single commit because either commit would be broken without the other.

I don't favor making zstd enabled by default: seems annoying for us who presumably don't care about it, and it adds a needless difference against upstream.

@illwieckz
illwieckz force-pushed the illwieckz/elf-compression branch 2 times, most recently from 2802de7 to 2d05194 Compare October 21, 2026 08:26
@illwieckz

Copy link
Copy Markdown
Member Author

Optional zlib support in the headers and in the autoconf script should be a single commit because either commit would be broken without the other.

Well, actually one could invert the commits and don't break the build, but then first commit would have disable zlib before the next commit re-enabling it. Now squashed.

I don't favor making zstd enabled by default: seems annoying for us who presumably don't care about it, and it adds a needless difference against upstream.

OK, so we have --disable-zlib and --enable-zstd. I still kept a commit rewording --enable-zstd the more idiomatic way.

About “it adds a needless difference against upstream”, I doubt upstream care about the autogen build anymore.

@illwieckz

illwieckz commented Oct 21, 2026 •

Copy link
Copy Markdown
Member Author

I doubt upstream care about the autogen build anymore.

Well, it looks like the only build system they have is autogen in their branch:

There is no trace of any GN thing or things like that. Maybe the stacktrace generator is built as part of another project (like we do), but they likely never test the rest! I guess that explains why they uploaded some windows binaries in the repo, they may not know how to build them…

@illwieckz
illwieckz marked this pull request as draft October 21, 2026 09:31
@illwieckz

illwieckz commented Oct 21, 2026 •

Copy link
Copy Markdown
Member Author

Hmm, actually, I'm doing some rework on the zstd thing, it doesn't work on some platforms (not found even when installed).

@illwieckz
illwieckz force-pushed the illwieckz/elf-compression branch from b06d8f2 to d62ddc3 Compare October 21, 2026 11:28
@illwieckz
illwieckz marked this pull request as ready for review October 21, 2026 11:28
@illwieckz

Copy link
Copy Markdown
Member Author

So, I noticed that zstd required pkg-config to be found on some systems (namely, macos-arm64). So I implemented it, as a fallback when direct linking doesn't work.

Just in case, I gave the same care to the zlib enablement (lib test first, pkg-config then, but only then).

I also fixed something I forgot in the first iteration of the PR: to not link against zlib. Zlib is almost everywhere, so even when the headers are not installed, it's very likely the library is there and the build would have succeeded, but there is no need to pass that link flag.

@slipher

slipher commented Oct 21, 2026

Copy link
Copy Markdown
Member

Chromium stopped using Breakpad crash generation years ago so it make sense there is no GN. ChromeOS might still be using it which would explain why it is maintained at all?

Comment thread Makefile.am
$(LIBZ_CFLAGS)
src_tools_linux_dump_syms_dump_syms_LDADD = \
$(RUSTC_DEMANGLE_LIBS) \
$(ZSTD_CFLAGS) \

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to mention it, but that also fixes that mistakes of those CFLAGS used instead of linker flags .

@illwieckz
illwieckz force-pushed the illwieckz/elf-compression branch from d62ddc3 to 85198ec Compare October 22, 2026 03:26
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.

2 participants