Skip to content

CMake plumbing to build tls_edit#43

Open
illwieckz wants to merge 1 commit into
illwieckz/cmakefrom
illwieckz/cmake-tls-edit
Open

CMake plumbing to build tls_edit#43
illwieckz wants to merge 1 commit into
illwieckz/cmakefrom
illwieckz/cmake-tls-edit

Conversation

@illwieckz

@illwieckz illwieckz commented Jul 13, 2026

Copy link
Copy Markdown
Member

CMake plumbing to build tls_edit.

Requires:

To build it, use src/tools/tls_edit as CMake source dir, not the main one building the loader.

@slipher

slipher commented Jul 14, 2026

Copy link
Copy Markdown
Member

Could this be made a stand-alone pull request? There is a force_tls_edit scons argument to use an externally-built tls_edit, so I would be able to validate this against the tests and approve quickly. Unlike the loader MinGW build which is still far from building correctly.

@slipher

slipher commented Jul 14, 2026

Copy link
Copy Markdown
Member

Note that #46 fixes some errors/warnings in the host-mode bits.

@illwieckz illwieckz mentioned this pull request Jul 14, 2026
@illwieckz

Copy link
Copy Markdown
Member Author

Could this be made a stand-alone pull request? There is a force_tls_edit scons argument to use an externally-built tls_edit, so I would be able to validate this against the tests and approve quickly. Unlike the loader MinGW build which is still far from building correctly.

It would be hard to do. This is small because it's written over all the other plumbing. While it is written to be built as a standalone build (this is a host tool), it leverages the rest of the CMake plumbing, and the shared libs (like platform) are built using the same CMake script as the loader. This is also done to keep close to what SCons did.

@illwieckz

illwieckz commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

Just to make it obvious, one can build the tls_edit tool this way:

cmake -S src/tools/tls_edit -B build-tls-edit
cmake --build build-tls-edit

This reuses some of the CMake work done in #14, but this is a standalone build.

This PR is not standalone, but the build is.

The root CMake configuration from #14 doesn't build the tls_edit tool even with those patches. If in the future we want it to be, it will be done as a CMake ExternalProject with the ability to use a different compiler (since it's a host tool). Though I do believe it's better to build it as part of the Saigo toolchain instead.

@illwieckz illwieckz force-pushed the illwieckz/cmake-tls-edit branch from 1301205 to ebae05e Compare July 14, 2026 08:58
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