Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llvm: update to LLVM 16.0.0 #314

Merged
merged 3 commits into from
Mar 23, 2023
Merged

llvm: update to LLVM 16.0.0 #314

merged 3 commits into from
Mar 23, 2023

Conversation

abrown
Copy link
Collaborator

@abrown abrown commented Mar 20, 2023

This builds on #313 (merge that first) to update the LLVM sources to point to the release version of LLVM 16.0.0. It also contains a Makefile fix for a path change for libclang_rt.builtins-wasm32.a. Closes #311.

Makefile Outdated
@@ -38,6 +38,7 @@ BASH=
endif

CLANG_VERSION=$(shell $(BASH) ./llvm_version.sh $(LLVM_PROJ_DIR))
CLANG_MAJOR_VERSION=$(shell $(BASH) ./llvm_version_major.sh $(LLVM_PROJ_DIR))
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need both of these.. can you just modify the existing llvm_version.sh to report just the major version?'

Otherwise LGTM

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Take a look at that last commit: the "make sure this isn't version 9 or 10" code also needed to change. (I wonder if there is an even better way to do that?)

abrown added 3 commits March 23, 2023 12:09
This changes updates the `src/llvm-project` submodule to the `HEAD` of
`release/16.x`, the same commit used to [release] the LLVM 16.0.0
binaries.

[release]: https://github.com/llvm/llvm-project/releases/tag/llvmorg-16.0.0
Due to [a change] in LLVM, Clang will expect to find the
`libclang_rt.builtins-wasm32.a` file in a path that only contains the
major version (`16`) instead of the entire version (`16.0.0`) as was
previously the case. This change modifies the `CMAKE_INSTALL_PREFIX` to
use Clang's major version only.

[a change]: https://reviews.llvm.org/D125860
Since the `Makefile` can get by with only knowing Clang's major version,
this change removes `llvm_version.sh` and sets `CLANG_VERSION` to use
only the major part.
@abrown abrown marked this pull request as ready for review March 23, 2023 15:51
@abrown abrown merged commit 46fe12f into WebAssembly:main Mar 23, 2023
@abrown abrown deleted the llvm16 branch March 23, 2023 15:52
sternenseemann added a commit to sternenseemann/nixpkgs that referenced this pull request Jul 5, 2023
pkgsCross.wasi32.llvmPackages: 12 -> 16

* It appears BULK_MEMORY_SOURCES no longer needs to be set to be empty
  to compile firefox. Without it, the build of wasilibc would fail if
  enableThreads is true.

* Include preliminary support for the experimental threads support in
  wasilibc which provides pthreads API. If wasilibc is built with
  support, is exposed via passthru and libcxx / libcxxabi are built with
  threads support accordingly.

  See also:
  - WebAssembly/wasi-sdk#274
  - WebAssembly/wasi-sdk#301
  - WebAssembly/wasi-sdk#314

  wasi-sdk ships it by default, but as a separate variant of libc which
  would be a hassle for us. Let's just make it optional for now.

  You can try it out using the following overlay:

      self: super: {
        wasilibc = super.wasilibc.override { enableThreads = true; };
      }

  Flags for libc++abi are copied from wasi-sdk.
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.

Can we update llvm version to 16.0.0?
2 participants