-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Rollup of 6 pull requests #72458
Merged
Merged
Rollup of 6 pull requests #72458
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NativeLibrary(Kind) -> NativeLib(Kind) NativeStatic -> StaticBundle NativeStaticNobundle -> StaticNoBundle NativeFramework -> Framework NativeRawDylib -> RawDylib NativeUnknown -> Unspecified
…akis clarify interaction of pin drop guarantee and panics Cc rust-lang/unsafe-code-guidelines#232 @Diggsey would this have helped?
remove broken link Not sure why this is broken @Marwes
Add target thumbv7a-uwp-windows-msvc Add target spec for thumbv7a-uwp-windows-msvc, so that libraries written in Rust will have a chance to run on ARM-based devices with Windows 10. So far I managed to create a proof-of-concept library for Universal Windows Platform apps to consume and it worked on a Windows Phone. However, building a standalone executable seemed troublesome due to `LLVM ERROR: target does not implement codeview register mapping` stuff (see also rust-lang#52659 (comment) ). Steps to test: 1. Clone and build this version ```sh git clone https://github.com/bdbai/rust.git cd rust python x.py build -i --target thumbv7a-uwp-windows-msvc --stage 1 src/libstd rustup toolchain link arm-uwp-stage1 .\build\x86_64-pc-windows-msvc\stage1\ ``` 2. Create a new library crate ```sh cargo new --lib arm-uwp-test cd arm-uwp-test ``` 3. Change `crate-type` in `Cargo.toml` to `staticlib` ```toml [lib] crate-type=["staticlib"] ``` 4. Replace the following code in `src/lib.rs` ```rust #[no_mangle] pub extern "system" fn call_rust() -> i32 { 2333 } ``` 5. Build the crate ```sh cargo +arm-uwp-stage1 build -v --target thumbv7a-uwp-windows-msvc ``` 6. `arm-uwp-test.lib` should appear in `target\thumbv7a-uwp-windows-msvc\debug` To consume this library: 1. Make sure Visual Studio 2017 and Windows 10 SDK (10.0.17134 or above) are installed 2. Create a new Blank App (C++/WinRT) in Visual Studio 2017 (Visual Studio 2019 cannot deploy UWP apps to Windows Phone) 3. Go to Property Pages, and then Linker->Input->Additional Dependencies, add `arm-uwp-test.lib` produced just now 4. Manually declare function prototypes in `MainPage.h` ```c++ extern "C" { int call_rust(); } ``` 5. Replace the `ClickHandler` part in `MainPage.cpp` ```c++ myButton().Content(box_value(std::to_wstring(call_rust()))); ``` 6. Build and deploy this app to an ARM device running Windows 10. The app should run and show `2333` when the button is clicked.
…kis,jethrogb,dingelish rustc_target: Avoid an inappropriate use of `post_link_objects` It isn't supposed to be used for linking libraries. Also linking libunwind unconditionally (and not together with the `src/libunwind` crate) is suspicious. @jethrogb @VardhanThigle Could you verify that it works as expected?
…asper Some renaming and minor refactoring for `NativeLibraryKind`
…es, r=Amanieu Enable ARM TME (Transactional Memory Extensions) Enables ARM TME coming up with LLVM 10. Related ARM TME intrinsics are included by the merge of rust-lang#67900. Enables: rust-lang/stdarch#855
📌 Commit 64beaff has been approved by |
☀️ Test successful - checks-azure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
post_link_objects
#72304 (rustc_target: Avoid an inappropriate use ofpost_link_objects
)NativeLibraryKind
#72309 (Some renaming and minor refactoring forNativeLibraryKind
)Failed merges:
r? @ghost