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

[JSC][32bit] Fix JIT being disabled when compiling JSC on linux with clang #10089

Merged

Conversation

mikhailramalho
Copy link
Contributor

@mikhailramalho mikhailramalho commented Feb 14, 2023

7dd18bd

[JSC][32bit] Fix JIT being disabled when compiling JSC on linux with clang
https://bugs.webkit.org/show_bug.cgi?id=234034

Reviewed by Justin Michaud.

JIT was always disabled when building JSC with clang on linux 32 bits
because CMake checked if the compiler defined __thumb2__ and while
gcc does define it by default, clang doesn't.

This patch adds extra compilation flags when compiling JSC with clang
for arm (except on Darwin), so the expected __thumb2__ define is defined
and JIT is enabled.

Also some minor changes:
(1) this patch also adds __ARM_ARCH_8__ and __ARM_ARCH_8A__
to the list that sets BTHUMB_ARCH_VERSION and WTF_THUMB_ARCH_VERSION to
4. These two seem to be used mostly for sanity check.
(2) a small fix in AirArg where clang complains about a missing
typename. gcc seems to accept either.

* Source/JavaScriptCore/b3/air/AirArg.h:
(JSC::B3::Air::Arg::isValidAddrForm):
* Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h:
(JSC::Wasm::parseAndCompileAirImpl):
* Source/WTF/wtf/PlatformCPU.h:
* Source/bmalloc/bmalloc/BPlatform.h:
* Source/cmake/OptionsCommon.cmake:

Canonical link: https://commits.webkit.org/260921@main

ad34acc

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ›  gtk
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk1 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  πŸ§ͺ jsc βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk2 βœ… πŸ›  jsc-armv7
βœ… πŸ›  πŸ§ͺ jsc-arm64 βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ§ͺ jsc-armv7-tests
βœ… πŸ›  watch βœ… πŸ§ͺ mac-wk2-stress βœ… πŸ›  jsc-mips
❌ πŸ›  πŸ§ͺ merge βœ… πŸ›  watch-sim βœ… πŸ§ͺ jsc-mips-tests

@mikhailramalho mikhailramalho self-assigned this Feb 14, 2023
@mikhailramalho mikhailramalho added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Feb 14, 2023
Copy link
Contributor

@justinmichaud justinmichaud left a comment

Choose a reason for hiding this comment

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

r=me

@mikhailramalho mikhailramalho added the merge-queue Applied to send a pull request to merge-queue label Feb 28, 2023
…clang

https://bugs.webkit.org/show_bug.cgi?id=234034

Reviewed by Justin Michaud.

JIT was always disabled when building JSC with clang on linux 32 bits
because CMake checked if the compiler defined __thumb2__ and while
gcc does define it by default, clang doesn't.

This patch adds extra compilation flags when compiling JSC with clang
for arm (except on Darwin), so the expected __thumb2__ define is defined
and JIT is enabled.

Also some minor changes:
(1) this patch also adds __ARM_ARCH_8__ and __ARM_ARCH_8A__
to the list that sets BTHUMB_ARCH_VERSION and WTF_THUMB_ARCH_VERSION to
4. These two seem to be used mostly for sanity check.
(2) a small fix in AirArg where clang complains about a missing
typename. gcc seems to accept either.

* Source/JavaScriptCore/b3/air/AirArg.h:
(JSC::B3::Air::Arg::isValidAddrForm):
* Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h:
(JSC::Wasm::parseAndCompileAirImpl):
* Source/WTF/wtf/PlatformCPU.h:
* Source/bmalloc/bmalloc/BPlatform.h:
* Source/cmake/OptionsCommon.cmake:

Canonical link: https://commits.webkit.org/260921@main
@webkit-commit-queue
Copy link
Collaborator

Committed 260921@main (7dd18bd): https://commits.webkit.org/260921@main

Reviewed commits have been landed. Closing PR #10089 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit 7dd18bd into WebKit:main Feb 28, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Feb 28, 2023
@mikhailramalho mikhailramalho deleted the clang-armv7-linux branch November 7, 2023 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Bugs Unclassified bugs are placed in this component until the correct component can be determined.
Projects
None yet
5 participants