It appears I accidentally merged in a git submodule diff in #197
which reverted the LLVM, wasi-libc, and config updates. Revert
that change, updating wasi-sdk again to LLVM 13.0 and the latest
wasi-libc and config.
It appears newer LLVM releases need a newer version of Python, and
Xenial is quite old at this point, there being two LTS releases newer
it at this time.
This makes use of https://reviews.llvm.org/D76653, which is in clang 11
and newer, to fix#53. With this, clang can find the sysroot relative to
its own path.
Fixes#58.
* fix deb build:
change makefile and deb_from_installation to invoke it with the new
build directory (changed in #143).
deb_from_installation will exit 0 if dpkg-deb missing so we dont try
to run it as part of `make package` on non-deb systems, but other errors
should cause the makefile to fail, which should catch regressions like
this sooner in the future.
* thank you fgsch for style fix
* Update how wasi-sdk uses cmake
Change `CMAKE_SYSTEM_NAME` to `WASI`, use a `CMAKE_MODULE_PATH`,
remove `CACHE` usage, and fix the compiler autodetection code so that
the "compiler works" hacks are no longer needed, following the advice in
[this comment](https://gitlab.kitware.com/cmake/cmake/-/issues/19223#note_567327).
This is hopefully a step towards re-submitting WASI support to upstream cmake.
* Add --sysroot to compiler-rt's C flags.
This ensures that it finds the built sysroot when testing whether the C
compiler works.
* Fixes.
* Use the just-built ar rather than the host ar.
* Use -DCMAKE_C_COMPILER_WORKS=ON instead of stubbing out archive files.
* Use -DCMAKE_CXX_COMPILER_WORKS=ON too.
* Restore the `--sysroot` argument when building compiler-rt.
compiler-rt depends on some libc headers, so it needs a sysroot.
* Add sysroot arguments for libc++ and libc++abi too.
* Also set CMAKE_AR.
It appears with the removal of the AR checks cmake is no longer
autodetecting CMAKE_AR, so set it explicitly.
* Remove --no-threads from wasi-sdk.cmake.
It was added to work around this bug:
https://bugs.llvm.org/show_bug.cgi?id=41508
which was fixed in LLVM 9.0.
* Remove LLVM 8.0 workarounds.
We still build with the `/opt/wasi-sdk` prefix but we don't actually
install into that directory. Instead we install into `build/install`.
This means you don't need to run `sudo make` and you don't end up with
a all the build output being owned by root.
The main different is that this requires the `--sysroot` flag when
running clang to build the testsuite.
* Add a basic testcase for emulated signals.
* Add a testcase for raise(SIGABRT).
* Fix style.
* Actually use all of the C-standard-required signals.
* Update expected stderr.
* Use the right version of this test file.
Co-authored-by: Pat Hickey <pat@moreproductive.org>
The update to LLVM 10.x was done in #108 but the submodule branch was
not updated.
As discussed in #136, the branch line is now removed to avoid such
problems.
* Make build work on Windows
* re-enable windows build workflow
* fix make check
* fix tar_from_installation.sh and dist target
* Review fixups
* No -j4 on Windows
* Get rid of -j4 everywhere in Makefile
* ci: add separate job to run docker build script
so that it doesn't bitrot
* github ci: try turning windows back on?
* workflow: run make in bash (for windows)
* windows doesnt have sudo
* github ci: windows is still broken, will have to fix later
* deb build: in wrong directory to mv build/wasi-sdk...deb
* ci: make filenames of uploaded artifacts more clear
* fix typo in deb creation
To support this, add a mechanism for filtering test output to filter
out uninteresting diffs.
This adds some coverage for the code being changed in
https://github.com/WebAssembly/wasi-libc/pull/184.
- Don't build pushes to non-main branches, only build the PR itself.
- Remove special windows llvm-nm installation
The SDK build process itself builds llvm so we don't need to download
it.
- Make the `name` the first item in each step. I peronally find
this more readable.
This change was mostly generated by changing the upstream llvm
branch to 9.x and running:
$ git submodule update --remote
As well as switching the llvm 9 this change also bring in the
following wasi-libc changes:
5933c20 fix macos filename, use https
7c39519 CI: upgrade to llvm 9.0.0
9ca5187 remove no-self-update workaround for windows azure
9580a25 deprecate azure pipelines CI, build libc on GH Actions
2c2fc9a Don't call `free` on paths which are about to call `_Exit`. (#161)
c6f2c05 gen-headers: Generate assertions of layout from witx (#149)
37c663f Correct minor typo in c_headers.rs (#166)
12f5832 Convert more wasi-libc code to `//`-style comments. (#153)
ec86d4d Improvements to wasi-headers tool (#160)
1fad338 Fix environment variable init to exit successfully. (#159)
a280fea Move math source files. (#151)
dd010be Avoid using cast expressions in WASI API constants. (#148)
Fixes: #101
This uses Apache-2.0, which is the same as what's used in other
WebAssembly CG repositories, plus the LLVM-exception which provides for
GPLv2 compatibility and makes it easier to move code between libraries
and compilers.