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

Initial commit for support of AArch64 in the llvm backend. #1044

Merged
merged 7 commits into from
Dec 13, 2019

Conversation

nlewycky
Copy link
Contributor

@nlewycky nlewycky commented Dec 6, 2019

Description

Enables AArch64 in the llvm backend, and inkwell when the target_arch is aarch64. Adds relevant failing spectests to the excludes.txt.

Review

  • Add a short description of the the change to the CHANGELOG.md file

@nlewycky
Copy link
Contributor Author

nlewycky commented Dec 7, 2019

bors r+

@bors
Copy link
Contributor

bors bot commented Dec 7, 2019

Merge conflict

@nlewycky nlewycky changed the title Initial commit for support of Aarch64 in the llvm backend. Initial commit for support of AArch64 in the llvm backend. Dec 7, 2019
@nlewycky nlewycky force-pushed the feature/llvm-on-arm branch from 3f7d002 to be7505c Compare December 7, 2019 01:22
@nlewycky nlewycky force-pushed the feature/llvm-on-arm branch from be7505c to 4f39102 Compare December 7, 2019 01:23
@nlewycky
Copy link
Contributor Author

nlewycky commented Dec 7, 2019

bors r+

bors bot added a commit that referenced this pull request Dec 7, 2019
1044: Initial commit for support of AArch64 in the llvm backend. r=nlewycky a=nlewycky

# Description
Enables AArch64 in the llvm backend, and inkwell when the target_arch is aarch64. Adds relevant failing spectests to the excludes.txt.

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Nick Lewycky <nick@wasmer.io>
@bors
Copy link
Contributor

bors bot commented Dec 7, 2019

Build failed

@nlewycky
Copy link
Contributor Author

nlewycky commented Dec 7, 2019

bors r+

bors bot added a commit that referenced this pull request Dec 7, 2019
1044: Initial commit for support of AArch64 in the llvm backend. r=nlewycky a=nlewycky

# Description
Enables AArch64 in the llvm backend, and inkwell when the target_arch is aarch64. Adds relevant failing spectests to the excludes.txt.

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Nick Lewycky <nick@wasmer.io>
@bors
Copy link
Contributor

bors bot commented Dec 7, 2019

Build failed

@nlewycky
Copy link
Contributor Author

nlewycky commented Dec 7, 2019

Given a Cargo.toml with:

[target.'cfg(target_arch = "x86_64")'.dependencies]
git = "https://github.com/TheDan64/inkwell"
rev = "781620e9fa30e51a6e03bd0d49b5f5bb7a782520"
default-features = false
features = ["llvm8-0", "target-x86"]

[target.'cfg(target_arch = "aarch64")'.dependencies]
git = "https://github.com/TheDan64/inkwell"
rev = "781620e9fa30e51a6e03bd0d49b5f5bb7a782520"
default-features = false
features = ["llvm8-0", "target-aarch64"]

when inkwell is built, both target-aarch64 and target-x86 are defined. This is due to rust-lang/cargo#4866. If the underlying LLVM was built without both X86 and AArch64 backends, this will lead to a link error. That's the cause of the windows build failure, that LLVM has the X86 backend but not the AArch64 backend.

@MarkMcCaskey
Copy link
Contributor

@nlewycky I believe we can fix this with the build.rs tricks we did before as long as the target-* inkwell features don't pull in any dependencies in the Cargo.toml, it will work

@nlewycky
Copy link
Contributor Author

@nlewycky I believe we can fix this with the build.rs tricks we did before as long as the target-* inkwell features don't pull in any dependencies in the Cargo.toml, it will work

I tried implementing this a couple ways, either with build.rs printing cargo:rustc-cfg=feature="target-x86_64" and having target-x86_64 = ["inkwell/target-x86"] in the Cargo.toml, or with build.rs printing cargo:rustc-cfg=feature="inkwell/target-x86" directly. Both times, inkwell is being built without the target being enabled, leading to an attempt to call inkwell::Target::initialize_x86 which isn't declared in inkwell.

@syrusakbary
Copy link
Member

bors r+

bors bot added a commit that referenced this pull request Dec 13, 2019
1044: Initial commit for support of AArch64 in the llvm backend. r=syrusakbary a=nlewycky

# Description
Enables AArch64 in the llvm backend, and inkwell when the target_arch is aarch64. Adds relevant failing spectests to the excludes.txt.

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: Syrus Akbary <me@syrusakbary.com>
@bors
Copy link
Contributor

bors bot commented Dec 13, 2019

Build failed

@syrusakbary
Copy link
Member

bors r+

bors bot added a commit that referenced this pull request Dec 13, 2019
1044: Initial commit for support of AArch64 in the llvm backend. r=syrusakbary a=nlewycky

# Description
Enables AArch64 in the llvm backend, and inkwell when the target_arch is aarch64. Adds relevant failing spectests to the excludes.txt.

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: Syrus Akbary <me@syrusakbary.com>
@syrusakbary
Copy link
Member

bors r-

@bors
Copy link
Contributor

bors bot commented Dec 13, 2019

Canceled

@syrusakbary
Copy link
Member

bors r+

bors bot added a commit that referenced this pull request Dec 13, 2019
1044: Initial commit for support of AArch64 in the llvm backend. r=syrusakbary a=nlewycky

# Description
Enables AArch64 in the llvm backend, and inkwell when the target_arch is aarch64. Adds relevant failing spectests to the excludes.txt.

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: Syrus Akbary <me@syrusakbary.com>
@bors
Copy link
Contributor

bors bot commented Dec 13, 2019

@bors bors bot merged commit 243e0b5 into master Dec 13, 2019
@bors bors bot deleted the feature/llvm-on-arm branch December 13, 2019 22:57
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.

3 participants