Merged
Conversation
This was used in old LLVM versions. Recent LLVM versions all emit either `__main_void` or `__main_argv_argc`, so we can use those directly.
sbc100
approved these changes
May 31, 2022
john-sharratt
pushed a commit
to john-sharratt/wasix-libc
that referenced
this pull request
Mar 6, 2023
* Remove support for `__original_main`. This was used in old LLVM versions. Recent LLVM versions all emit either `__main_void` or `__main_argv_argc`, so we can use those directly. * Update the CI to use LLVM 14.0.0.
alexcrichton
added a commit
to alexcrichton/wasi-libc
that referenced
this pull request
Nov 21, 2025
This commit migrates wasi-libc's build system from a `make`-based system to CMake. This is a complete rewrite of the build system which culminates in the deletion of the current `Makefile` and a few supporting scripts and files. The rationale/reasons for this are similar to WebAssembly/wasi-sdk#429, namely: * Building a correct and robust build system in `make` is not easy. There are many times I've found myself in a situation where I need to blow away the entire build directory between builds. Much of the this this bottoms out in subtle behavior like "this file was renamed, but didn't get deleted in the archive" or subtle things like that. CMake is responsible for handling these by default and, in general, is probably going to be more correct than what we write. * Out-of-tree builds are now supported. * Customizing CFLAGS is now supported via standard mechanisms. Previously `EXTRA_CFLAGS` was required since using `CFLAGS` could break the build. * It's easier to move more logic into CMake, such as downloading compiler-rt, than it is to codify it all in makefiles. * Platform portability is generally easier in CMake than make. Building on Windows shouldn't require a full GNU-like environment, for example. * Tests now properly rebuild themselves when wasi-libc changes. * It's easier to customize high-level options, like "enable SIMD", in CMake than it is in Makefiles. This can be documented as a single option to pass where that option affects the build, flags, etc. Personally I'm not a fan of CMake, but I'm more of a fan of it than Makefiles, hence my desire to switch. I want to make this repository easier to build, configure, and change over time. This will also make it easier to integrate this all into wasi-sdk where everything is CMake-based over there as well. I am not a CMake expert, nor am I necessarily an expert in the previous Makefiles. I've done my best here, but I'm happy to change things if someone who knows more about CMake than I (which is a lot of folks) recommends doing so. I'm also happy to adjust the libc build as desired too. Closes WebAssembly#46 Closes WebAssembly#156 Closes WebAssembly#295 Closes WebAssembly#322 Closes WebAssembly#330 Closes WebAssembly#514 Closes WebAssembly#605
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was used in old LLVM versions. Recent LLVM versions all emit either
__main_voidor__main_argv_argc, so we can use those directly.