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

Enable compilation for specific target #964

Merged
merged 1 commit into from
Nov 16, 2019
Merged

Conversation

xofyarg
Copy link
Contributor

@xofyarg xofyarg commented Nov 13, 2019

Description

By exposing the target information through CompilerConfig,
compiler(only LLVM at the moment) could create a machine with
different CPU feature flags other than current host, which makes it
capable to "cross compile" to some degree.

Update #959

Review

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

@Hywan Hywan added 📦 lib-compiler-llvm About wasmer-compiler-llvm 📦 lib-deprecated About the deprecated crates 🎉 enhancement New feature! labels Nov 14, 2019
@Hywan
Copy link
Contributor

Hywan commented Nov 14, 2019

Thanks for the PR. It looks interesting. Maybe @nlewycky can provide me valuable insights.

@syrusakbary
Copy link
Member

bors r+

bors bot added a commit that referenced this pull request Nov 15, 2019
964: Enable compilation for specific target r=syrusakbary a=xofyarg


<!-- 
Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test:
https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests

-->

# Description
<!-- 
Provide details regarding the change including motivation,
links to related issues, and the context of the PR.
-->
By exposing the target information through `CompilerConfig`,
compiler(only LLVM at the moment) could create a machine with
different CPU feature flags other than current host, which makes it
capable to "cross compile" to some degree.

Update #959

# Review

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


Co-authored-by: anb <anb@dev.null>
@bors
Copy link
Contributor

bors bot commented Nov 15, 2019

Build failed

  • wasmerio.wasmer

@syrusakbary
Copy link
Member

syrusakbary commented Nov 15, 2019

@xofyarg it seems src/bin/kwasmd.rs CompilerConfig needs to be updated with the new fields (tests are failing).

From tests:

error[E0063]: missing fields `cpu_features`, `cpu_name`, `triple` in initializer of `wasmer_runtime_core::backend::CompilerConfig`
  --> src/bin/kwasmd.rs:60:9
   |
60 |         CompilerConfig {
   |         ^^^^^^^^^^^^^^ missing `cpu_features`, `cpu_name`, `triple`

Once that's addressed it should be good to merge!

@xofyarg
Copy link
Contributor Author

xofyarg commented Nov 16, 2019

PR updated.

@MarkMcCaskey
Copy link
Contributor

@xofyarg Can you add a brief explanation to the unimplemented!s? Even just like clif::func_name is fine. It makes debugging these things a lot easier.

I'll ship it as soon that's updated!

By exposing the target information through `CompilerConfig`,
compiler(only LLVM at the moment) could create a machine with
different CPU feature flags other than current host, which makes it
capable to "cross compile" to some degree.

Update wasmerio#959
@xofyarg
Copy link
Contributor Author

xofyarg commented Nov 16, 2019

Brief explanation added and rebased.

Copy link
Contributor

@MarkMcCaskey MarkMcCaskey left a comment

Choose a reason for hiding this comment

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

Perfect -- thank you!

@MarkMcCaskey
Copy link
Contributor

bors r+

bors bot added a commit that referenced this pull request Nov 16, 2019
964: Enable compilation for specific target r=MarkMcCaskey a=xofyarg


<!-- 
Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test:
https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests

-->

# Description
<!-- 
Provide details regarding the change including motivation,
links to related issues, and the context of the PR.
-->
By exposing the target information through `CompilerConfig`,
compiler(only LLVM at the moment) could create a machine with
different CPU feature flags other than current host, which makes it
capable to "cross compile" to some degree.

Update #959

# Review

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


Co-authored-by: anb <anb@dev.null>
@bors
Copy link
Contributor

bors bot commented Nov 16, 2019

Build succeeded

  • wasmerio.wasmer

@bors bors bot merged commit 3b2d751 into wasmerio:master Nov 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 enhancement New feature! 📦 lib-compiler-llvm About wasmer-compiler-llvm 📦 lib-deprecated About the deprecated crates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants