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

Add UWP MSVC targets #63155

Merged
merged 8 commits into from Aug 15, 2019

Conversation

@mfkl
Copy link
Contributor

commented Jul 31, 2019

Hi,

  • The README URI change is the correct one for VS2019 community edition, which I suspect most people would use. Doesn't need to be merged though.
  • This 5e6619e fixes the UWP build (msvc or not, doesn't matter). I suspect it broke with recent changes unnoticed because no CI.
  • Store lib location is found through the VCToolsInstallDir env variable. The end of the path is currently for the VS2019 store lib locations only.
  • I could not test the aarch64_uwp_windows_msvc target because the rust build script does not currently support arm64 msvc AFAIU.
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jul 31, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-07-31T09:48:21.4225980Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-07-31T09:48:21.4435447Z ##[command]git config gc.auto 0
2019-07-31T09:48:21.4507864Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-07-31T09:48:21.4556233Z ##[command]git config --get-all http.proxy
2019-07-31T09:48:21.4688528Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/63155/merge:refs/remotes/pull/63155/merge
---
2019-07-31T09:48:58.2591647Z do so (now or later) by using -b with the checkout command again. Example:
2019-07-31T09:48:58.2591679Z 
2019-07-31T09:48:58.2591892Z   git checkout -b <new-branch-name>
2019-07-31T09:48:58.2591922Z 
2019-07-31T09:48:58.2591969Z HEAD is now at ebf2dbd3d Merge 6e4d02369ab30872bf4fa86ed2d2e6f897d0cbd8 into 4a18848e05b0957474fdb5be162502742b5eb9fd
2019-07-31T09:48:58.2747180Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-07-31T09:48:58.2749639Z ==============================================================================
2019-07-31T09:48:58.2749688Z Task         : Bash
2019-07-31T09:48:58.2749726Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-07-31T09:55:14.5442351Z    Compiling serde_json v1.0.40
2019-07-31T09:55:18.6824883Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-07-31T09:55:27.0768694Z     Finished release [optimized] target(s) in 1m 27s
2019-07-31T09:55:27.0838234Z tidy check
2019-07-31T09:55:28.2153702Z tidy error: /checkout/src/librustc_target/spec/aarch64_uwp_windows_msvc.rs:14: line longer than 100 chars
2019-07-31T09:55:28.2154765Z tidy error: /checkout/src/librustc_target/spec/x86_64_uwp_windows_msvc.rs:12: line longer than 100 chars
2019-07-31T09:55:28.2154929Z tidy error: /checkout/src/librustc_target/spec/x86_64_uwp_windows_msvc.rs: missing trailing newline
2019-07-31T09:55:28.2155079Z tidy error: /checkout/src/librustc_target/spec/windows_uwp_msvc_base.rs: missing trailing newline
2019-07-31T09:55:28.2155220Z tidy error: /checkout/src/librustc_target/spec/i686_uwp_windows_msvc.rs:12: line longer than 100 chars
2019-07-31T09:55:28.2155370Z tidy error: /checkout/src/librustc_target/spec/i686_uwp_windows_msvc.rs: missing trailing newline
2019-07-31T09:55:28.8696978Z some tidy checks failed
2019-07-31T09:55:28.8701784Z 
2019-07-31T09:55:28.8701784Z 
2019-07-31T09:55:28.8702641Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-07-31T09:55:28.8702807Z 
2019-07-31T09:55:28.8702834Z 
2019-07-31T09:55:28.8710538Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-07-31T09:55:28.8710665Z Build completed unsuccessfully in 0:01:30
2019-07-31T09:55:28.8710665Z Build completed unsuccessfully in 0:01:30
2019-07-31T09:55:30.3786674Z ##[error]Bash exited with code '1'.
2019-07-31T09:55:30.3819321Z ##[section]Starting: Checkout
2019-07-31T09:55:30.3821325Z ==============================================================================
2019-07-31T09:55:30.3821381Z Task         : Get sources
2019-07-31T09:55:30.3821449Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jul 31, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-07-31T10:16:20.5013564Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-07-31T10:16:20.5213505Z ##[command]git config gc.auto 0
2019-07-31T10:16:20.5619133Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-07-31T10:16:20.5672876Z ##[command]git config --get-all http.proxy
2019-07-31T10:16:20.5814404Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/63155/merge:refs/remotes/pull/63155/merge
---
2019-07-31T10:16:53.9051310Z do so (now or later) by using -b with the checkout command again. Example:
2019-07-31T10:16:53.9051336Z 
2019-07-31T10:16:53.9051511Z   git checkout -b <new-branch-name>
2019-07-31T10:16:53.9051546Z 
2019-07-31T10:16:53.9051604Z HEAD is now at fe5c03742 Merge 3c6f6f031600dce97d2fd61a51afb17ff7f453ec into 4a18848e05b0957474fdb5be162502742b5eb9fd
2019-07-31T10:16:53.9199528Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-07-31T10:16:53.9202738Z ==============================================================================
2019-07-31T10:16:53.9202793Z Task         : Bash
2019-07-31T10:16:53.9202839Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-07-31T11:18:47.6042509Z .................................................................................................... 1400/8819
2019-07-31T11:18:53.5830997Z .................................................................................................... 1500/8819
2019-07-31T11:19:06.4386168Z .................................................................i...............i.................. 1600/8819
2019-07-31T11:19:14.1468337Z .................................................................................................... 1700/8819
2019-07-31T11:19:29.2986121Z ...................................................iiiii............................................ 1800/8819
2019-07-31T11:19:40.7205607Z .................................................................................................... 2000/8819
2019-07-31T11:19:43.3194744Z .................................................................................................... 2100/8819
2019-07-31T11:19:47.0233417Z .................................................................................................... 2200/8819
2019-07-31T11:19:53.8441917Z .................................................................................................... 2300/8819
---
2019-07-31T11:23:52.5192429Z .................................................................................................... 5300/8819
2019-07-31T11:24:00.0948584Z ..............i..................................................................................... 5400/8819
2019-07-31T11:24:05.6266896Z .................................................................................................... 5500/8819
2019-07-31T11:24:18.2782348Z .................................................................................................... 5600/8819
2019-07-31T11:24:32.0501115Z ........ii...i..ii...........i...................................................................... 5700/8819
2019-07-31T11:24:47.3253310Z .................................................................................................... 5900/8819
2019-07-31T11:24:52.2246068Z .................................................................................................... 6000/8819
2019-07-31T11:24:52.2246068Z .................................................................................................... 6000/8819
2019-07-31T11:25:06.4139157Z ........i..ii....................................................................................... 6100/8819
2019-07-31T11:25:25.8901099Z ...................................................i................................................ 6300/8819
2019-07-31T11:25:28.0858836Z .................................................................................................... 6400/8819
2019-07-31T11:25:30.5847527Z .....................i.............................................................................. 6500/8819
2019-07-31T11:25:35.1722186Z .................................................................................................... 6600/8819
---
2019-07-31T11:30:17.8414994Z  finished in 23.005
2019-07-31T11:30:17.8599168Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-07-31T11:30:18.0402972Z 
2019-07-31T11:30:18.0404055Z running 146 tests
2019-07-31T11:30:21.4657953Z i....iii......iii..iiii....i............................i..i................i....i.........ii.i.i..i 100/146
2019-07-31T11:30:23.3376652Z iii..............i.........iii.i......ii......
2019-07-31T11:30:23.3377133Z 
2019-07-31T11:30:23.3379893Z  finished in 5.478
2019-07-31T11:30:23.3572387Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-07-31T11:30:23.5197858Z 
---
2019-07-31T11:30:25.5945400Z  finished in 2.237
2019-07-31T11:30:25.6126093Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-07-31T11:30:25.7676532Z 
2019-07-31T11:30:25.7678847Z running 9 tests
2019-07-31T11:30:25.7681196Z iiiiiiiii
2019-07-31T11:30:25.7681883Z 
2019-07-31T11:30:25.7682036Z  finished in 0.155
2019-07-31T11:30:25.7848528Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-07-31T11:30:25.9450574Z 
---
2019-07-31T11:30:44.4847822Z  finished in 18.699
2019-07-31T11:30:44.5029343Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-07-31T11:30:44.6634082Z 
2019-07-31T11:30:44.6634324Z running 122 tests
2019-07-31T11:31:08.9409280Z .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....i..........iiii..........i...ii...i.......ii.i 100/122
2019-07-31T11:31:13.7440186Z .i.i......iii.i.....ii
2019-07-31T11:31:13.7443957Z 
2019-07-31T11:31:13.7444227Z  finished in 29.241
2019-07-31T11:31:13.7449075Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-07-31T11:31:13.7449641Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-07-31T11:45:21.9771395Z 
2019-07-31T11:45:21.9772216Z    Doc-tests core
2019-07-31T11:45:26.0916882Z 
2019-07-31T11:45:26.0917912Z running 2379 tests
2019-07-31T11:45:38.7950996Z ......iiiii......................................................................................... 100/2379
2019-07-31T11:45:51.4355611Z .........................................................................ii......................... 200/2379
2019-07-31T11:46:21.2432616Z .................................................................................................... 400/2379
2019-07-31T11:46:21.2432616Z .................................................................................................... 400/2379
2019-07-31T11:46:32.3810930Z ..............................i..i.................iiii............................................. 500/2379
2019-07-31T11:46:55.9137485Z .................................................................................................... 700/2379
2019-07-31T11:47:08.1778924Z .................................................................................................... 800/2379
2019-07-31T11:47:20.1212279Z .................................................................................................... 900/2379
2019-07-31T11:47:32.2848476Z .................................................................................................... 1000/2379
---
2019-07-31T11:52:47.2323287Z 
2019-07-31T11:52:47.2323945Z running 989 tests
2019-07-31T11:53:10.9971743Z i................................................................................................... 100/989
2019-07-31T11:53:24.2189496Z .................................................................................................... 200/989
2019-07-31T11:53:33.0270708Z .................iii......i......i...i......i....................................................... 300/989
2019-07-31T11:53:37.8991370Z .................................................................................................... 400/989
2019-07-31T11:53:46.2164312Z ................................i..i.................................ii............................. 500/989
2019-07-31T11:54:01.1810882Z .................................................................................................... 700/989
2019-07-31T11:54:01.1810882Z .................................................................................................... 700/989
2019-07-31T11:54:09.6610687Z ...............iiii................................................................................. 800/989
2019-07-31T11:54:24.1911871Z .................................................................................................... 900/989
2019-07-31T11:54:31.7168452Z .....................................iiii................................................
2019-07-31T11:54:31.7174542Z 
2019-07-31T11:54:31.7363435Z  finished in 240.648
2019-07-31T11:54:31.7382281Z Testing unwind stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-07-31T11:54:31.9210697Z     Finished release [optimized] target(s) in 0.17s
---
2019-07-31T11:57:16.5203263Z .................F..........................................F....................................... 100/138
2019-07-31T11:57:16.5297344Z ....................................F.
2019-07-31T11:57:16.5297625Z failures:
2019-07-31T11:57:16.5299765Z 
2019-07-31T11:57:16.5300421Z ---- spec::test_json_encode_decode::aarch64_uwp_windows_msvc stdout ----
2019-07-31T11:57:16.5301300Z thread 'spec::test_json_encode_decode::aarch64_uwp_windows_msvc' panicked at 'VCToolsInstallDir not found in env: NotPresent', src/libcore/result.rs:1084:5
2019-07-31T11:57:16.5301587Z 
2019-07-31T11:57:16.5301587Z 
2019-07-31T11:57:16.5301948Z ---- spec::test_json_encode_decode::i686_uwp_windows_msvc stdout ----
2019-07-31T11:57:16.5302374Z thread 'spec::test_json_encode_decode::i686_uwp_windows_msvc' panicked at 'VCToolsInstallDir not found in env: NotPresent', src/libcore/result.rs:1084:5
2019-07-31T11:57:16.5302558Z 
2019-07-31T11:57:16.5302909Z ---- spec::test_json_encode_decode::x86_64_uwp_windows_msvc stdout ----
2019-07-31T11:57:16.5303337Z thread 'spec::test_json_encode_decode::x86_64_uwp_windows_msvc' panicked at 'VCToolsInstallDir not found in env: NotPresent', src/libcore/result.rs:1084:5
2019-07-31T11:57:16.5303607Z 
2019-07-31T11:57:16.5303725Z failures:
2019-07-31T11:57:16.5303847Z     spec::test_json_encode_decode::aarch64_uwp_windows_msvc
2019-07-31T11:57:16.5303991Z     spec::test_json_encode_decode::i686_uwp_windows_msvc
2019-07-31T11:57:16.5303991Z     spec::test_json_encode_decode::i686_uwp_windows_msvc
2019-07-31T11:57:16.5304116Z     spec::test_json_encode_decode::x86_64_uwp_windows_msvc
2019-07-31T11:57:16.5304219Z 
2019-07-31T11:57:16.5304365Z test result: FAILED. 135 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out
2019-07-31T11:57:16.5304469Z 
2019-07-31T11:57:16.5319641Z error: test failed, to rerun pass '-p rustc_target --lib'
2019-07-31T11:57:16.5336789Z 
2019-07-31T11:57:16.5336789Z 
2019-07-31T11:57:16.5337602Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-j" "2" "--release" "--locked" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "-p" "rustc_target" "--" "--quiet"
2019-07-31T11:57:16.5337986Z 
2019-07-31T11:57:16.5338106Z 
2019-07-31T11:57:16.5345841Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-07-31T11:57:16.5346055Z Build completed unsuccessfully in 1:33:29
2019-07-31T11:57:16.5346055Z Build completed unsuccessfully in 1:33:29
2019-07-31T11:57:17.1169219Z ##[error]Bash exited with code '1'.
2019-07-31T11:57:17.1227686Z ##[section]Starting: Checkout
2019-07-31T11:57:17.1229642Z ==============================================================================
2019-07-31T11:57:17.1229704Z Task         : Get sources
2019-07-31T11:57:17.1229909Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jul 31, 2019

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @zackmdavis (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@Centril

This comment has been minimized.

Copy link
Member

commented Jul 31, 2019

@Centril Centril added this to the 1.38 milestone Jul 31, 2019

// FIXME: this shouldn't be panic=abort, it should be panic=unwind
base.panic_strategy = PanicStrategy::Abort;

let lib_root_path = env::var("VCToolsInstallDir")

This comment has been minimized.

Copy link
@alexcrichton

alexcrichton Jul 31, 2019

Member

Note that we already have a good deal of support for this via the cc::windows_registry probing that we do in the backend. I think it'd be best to do this there instead of here to not require that the VCToolsInstallDir env var is set. Current MSVC targets don't set this env var and I think that with the probing logic we have you should be able to find the root path anyway?

This comment has been minimized.

Copy link
@mfkl

mfkl Aug 5, 2019

Author Contributor

Done

@Centril

This comment has been minimized.

Copy link
Member

commented Jul 31, 2019

@@ -11,6 +11,7 @@ path = "lib.rs"
[dependencies]
bitflags = "1.0"
log = "0.4"
cc = "1.0.1"

This comment has been minimized.

Copy link
@alexcrichton

alexcrichton Aug 5, 2019

Member

Oh sorry I meant moreso that cc is laready linked elsewhere and it's already handled in probing for it, so we should reuse that location to add paths to link as opposed to doing so in the target spec directory here. (as this is how MSVC is handled in general)

This comment has been minimized.

Copy link
@mfkl

mfkl Aug 6, 2019

Author Contributor

Sorry I'm still not clear on what to do.

You want me to patch cc-rs or librustc_codegen_ssa or both?

This comment has been minimized.

Copy link
@alexcrichton

alexcrichton Aug 6, 2019

Member

Sorry so what I mean is that librustc_codegen_ssa already (AFAIK) has tons of logic for dealing with MSVC and leverages the cc crate to find compilers and add paths to link against. The logic for handling UWP paths should all happen around there rather than being duplicated here.

This comment has been minimized.

Copy link
@mfkl

mfkl Aug 8, 2019

Author Contributor

Code is not pretty... but it seems to work. Let me know what you think

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Aug 5, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-08-05T14:30:36.2171981Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-08-05T14:30:36.2394925Z ##[command]git config gc.auto 0
2019-08-05T14:30:36.2450659Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-08-05T14:30:36.2508320Z ##[command]git config --get-all http.proxy
2019-08-05T14:30:36.2644284Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/63155/merge:refs/remotes/pull/63155/merge
---
2019-08-05T14:31:12.5728869Z do so (now or later) by using -b with the checkout command again. Example:
2019-08-05T14:31:12.5728900Z 
2019-08-05T14:31:12.5729132Z   git checkout -b <new-branch-name>
2019-08-05T14:31:12.5729188Z 
2019-08-05T14:31:12.5729259Z HEAD is now at 51a865036 Merge e3d8b6817ef0369915fb0dc5f2f519e942f8d67f into 4be067558962c004b638e4c6f162d50f7c0c98b6
2019-08-05T14:31:12.5931345Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-08-05T14:31:12.5934106Z ==============================================================================
2019-08-05T14:31:12.5934163Z Task         : Bash
2019-08-05T14:31:12.5934227Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-08-05T15:33:05.5173134Z .................................................................................................... 1400/8827
2019-08-05T15:33:11.7245977Z .................................................................................................... 1500/8827
2019-08-05T15:33:24.5719447Z ....................................................................i...............i............... 1600/8827
2019-08-05T15:33:31.8644218Z .................................................................................................... 1700/8827
2019-08-05T15:33:47.7072844Z ......................................................iiiii......................................... 1800/8827
2019-08-05T15:33:59.2180508Z .................................................................................................... 2000/8827
2019-08-05T15:34:01.8016080Z .................................................................................................... 2100/8827
2019-08-05T15:34:05.2596003Z .................................................................................................... 2200/8827
2019-08-05T15:34:13.3591409Z .................................................................................................... 2300/8827
---
2019-08-05T15:38:05.5520634Z .................................................................................................... 5200/8827
2019-08-05T15:38:13.8758946Z .....................................................................i.............................. 5300/8827
2019-08-05T15:38:21.2171645Z .................................................................................................... 5400/8827
2019-08-05T15:38:28.1438764Z .................................................................................................... 5500/8827
2019-08-05T15:38:39.5274373Z ...............................................................ii...i..ii...........i............... 5600/8827
2019-08-05T15:39:02.6497271Z .................................................................................................... 5800/8827
2019-08-05T15:39:07.8224631Z .................................................................................................... 5900/8827
2019-08-05T15:39:07.8224631Z .................................................................................................... 5900/8827
2019-08-05T15:39:14.1868337Z ................................................................i..ii............................... 6000/8827
2019-08-05T15:39:43.5916254Z .................................................................................................... 6200/8827
2019-08-05T15:39:45.8069123Z .......i............................................................................................ 6300/8827
2019-08-05T15:39:47.9620174Z ...............................................................................i.................... 6400/8827
2019-08-05T15:39:50.6659468Z .................................................................................................... 6500/8827
---
2019-08-05T15:44:41.4253521Z  finished in 20.825
2019-08-05T15:44:41.4446520Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-05T15:44:41.6126404Z 
2019-08-05T15:44:41.6126719Z running 146 tests
2019-08-05T15:44:44.9273170Z i....iii......iii..iiii....i............................i..i................i....i.........ii.i.i..i 100/146
2019-08-05T15:44:46.8035310Z iii..............i.........iii.i......ii......
2019-08-05T15:44:46.8036459Z 
2019-08-05T15:44:46.8042742Z  finished in 5.359
2019-08-05T15:44:46.8231679Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-05T15:44:46.9831020Z 
---
2019-08-05T15:44:49.1047701Z  finished in 2.281
2019-08-05T15:44:49.1247444Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-05T15:44:49.2913018Z 
2019-08-05T15:44:49.2913335Z running 9 tests
2019-08-05T15:44:49.2914303Z iiiiiiiii
2019-08-05T15:44:49.2914609Z 
2019-08-05T15:44:49.2918001Z  finished in 0.166
2019-08-05T15:44:49.3117752Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-05T15:44:49.4810640Z 
---
2019-08-05T15:45:08.0727973Z  finished in 18.761
2019-08-05T15:45:08.0924919Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-05T15:45:08.2528363Z 
2019-08-05T15:45:08.2529974Z running 122 tests
2019-08-05T15:45:32.4427705Z .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....i..........iiii..........i...ii...i.......ii.i 100/122
2019-08-05T15:45:37.1502672Z .i.i......iii.i.....ii
2019-08-05T15:45:37.1505640Z 
2019-08-05T15:45:37.1510234Z  finished in 29.058
2019-08-05T15:45:37.1518682Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-05T15:45:37.1519014Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-08-05T16:00:00.8566377Z 
2019-08-05T16:00:00.8568169Z    Doc-tests core
2019-08-05T16:00:05.1645176Z 
2019-08-05T16:00:05.1645530Z running 2379 tests
2019-08-05T16:00:17.8661496Z ......iiiii......................................................................................... 100/2379
2019-08-05T16:00:30.4156451Z .........................................................................ii......................... 200/2379
2019-08-05T16:00:59.8013960Z .................................................................................................... 400/2379
2019-08-05T16:00:59.8013960Z .................................................................................................... 400/2379
2019-08-05T16:01:11.1197924Z ..............................i..i.................iiii............................................. 500/2379
2019-08-05T16:01:34.6361065Z .................................................................................................... 700/2379
2019-08-05T16:01:46.5990045Z .................................................................................................... 800/2379
2019-08-05T16:01:58.6722631Z .................................................................................................... 900/2379
2019-08-05T16:02:10.7272333Z .................................................................................................... 1000/2379
---
2019-08-05T16:07:29.9665608Z 
2019-08-05T16:07:29.9677875Z running 989 tests
2019-08-05T16:07:53.8318935Z i................................................................................................... 100/989
2019-08-05T16:08:07.1280930Z .................................................................................................... 200/989
2019-08-05T16:08:15.9362878Z .................iii......i......i...i......i....................................................... 300/989
2019-08-05T16:08:20.8770246Z .................................................................................................... 400/989
2019-08-05T16:08:29.3127519Z ................................i..i.................................ii............................. 500/989
2019-08-05T16:08:44.7512298Z .................................................................................................... 700/989
2019-08-05T16:08:44.7512298Z .................................................................................................... 700/989
2019-08-05T16:08:53.2398219Z ...............iiii................................................................................. 800/989
2019-08-05T16:09:07.9140070Z .................................................................................................... 900/989
2019-08-05T16:09:15.5511285Z .....................................iiii................................................
2019-08-05T16:09:15.5515244Z 
2019-08-05T16:09:15.5696069Z  finished in 245.688
2019-08-05T16:09:15.5711270Z Testing unwind stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-08-05T16:09:15.7582214Z     Finished release [optimized] target(s) in 0.18s
---
2019-08-05T16:12:06.3638221Z .................F.............................................F.................................... 100/140
2019-08-05T16:12:06.3731698Z ......................................F.
2019-08-05T16:12:06.3732033Z failures:
2019-08-05T16:12:06.3732273Z 
2019-08-05T16:12:06.3733319Z ---- spec::test_json_encode_decode::aarch64_uwp_windows_msvc stdout ----
2019-08-05T16:12:06.3735081Z thread 'spec::test_json_encode_decode::aarch64_uwp_windows_msvc' panicked at 'no path found for link.exe', src/libcore/option.rs:1166:5
2019-08-05T16:12:06.3735707Z 
2019-08-05T16:12:06.3735707Z 
2019-08-05T16:12:06.3736491Z ---- spec::test_json_encode_decode::i686_uwp_windows_msvc stdout ----
2019-08-05T16:12:06.3737138Z thread 'spec::test_json_encode_decode::i686_uwp_windows_msvc' panicked at 'no path found for link.exe', src/libcore/option.rs:1166:5
2019-08-05T16:12:06.3737404Z 
2019-08-05T16:12:06.3737888Z ---- spec::test_json_encode_decode::x86_64_uwp_windows_msvc stdout ----
2019-08-05T16:12:06.3738678Z thread 'spec::test_json_encode_decode::x86_64_uwp_windows_msvc' panicked at 'no path found for link.exe', src/libcore/option.rs:1166:5
2019-08-05T16:12:06.3739423Z 
2019-08-05T16:12:06.3739811Z failures:
2019-08-05T16:12:06.3740008Z     spec::test_json_encode_decode::aarch64_uwp_windows_msvc
2019-08-05T16:12:06.3740204Z     spec::test_json_encode_decode::i686_uwp_windows_msvc
2019-08-05T16:12:06.3740204Z     spec::test_json_encode_decode::i686_uwp_windows_msvc
2019-08-05T16:12:06.3740427Z     spec::test_json_encode_decode::x86_64_uwp_windows_msvc
2019-08-05T16:12:06.3740599Z 
2019-08-05T16:12:06.3740795Z test result: FAILED. 137 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out
2019-08-05T16:12:06.3741007Z 
2019-08-05T16:12:06.3749744Z error: test failed, to rerun pass '-p rustc_target --lib'
2019-08-05T16:12:06.3769442Z 
2019-08-05T16:12:06.3769442Z 
2019-08-05T16:12:06.3770672Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-j" "2" "--release" "--locked" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "-p" "rustc_target" "--" "--quiet"
2019-08-05T16:12:06.3770819Z 
2019-08-05T16:12:06.3770846Z 
2019-08-05T16:12:06.3783499Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-08-05T16:12:06.3783592Z Build completed unsuccessfully in 1:34:44
2019-08-05T16:12:06.3783592Z Build completed unsuccessfully in 1:34:44
2019-08-05T16:12:07.3296751Z ##[error]Bash exited with code '1'.
2019-08-05T16:12:07.3377456Z ##[section]Starting: Checkout
2019-08-05T16:12:07.3379485Z ==============================================================================
2019-08-05T16:12:07.3379537Z Task         : Get sources
2019-08-05T16:12:07.3379581Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

base.max_atomic_width = Some(64);
base.has_elf_tls = true;

// FIXME: this shouldn't be panic=abort, it should be panic=unwind

This comment has been minimized.

Copy link
@jdm

jdm Aug 8, 2019

Contributor

What's the background on this FIXME that causes it to exist? Does that belong in a comment or an issue?

This comment has been minimized.

Copy link
@alexcrichton

alexcrichton Aug 8, 2019

Member

The AArch64 Windows backend didn't implement SEH unwinding when the aarch64-pc-windows-msvc target was first added, so I suspect this is the same as that. I haven't checked the LLVM backend recently to see if this works.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Aug 8, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-08-08T16:26:42.3482806Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-08-08T16:26:43.2791345Z ##[command]git config gc.auto 0
2019-08-08T16:26:43.2794566Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-08-08T16:26:43.2796853Z ##[command]git config --get-all http.proxy
2019-08-08T16:26:43.2800014Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/63155/merge:refs/remotes/pull/63155/merge
---
2019-08-08T16:27:18.1040438Z do so (now or later) by using -b with the checkout command again. Example:
2019-08-08T16:27:18.1040469Z 
2019-08-08T16:27:18.1040695Z   git checkout -b <new-branch-name>
2019-08-08T16:27:18.1040741Z 
2019-08-08T16:27:18.1040790Z HEAD is now at 7c65382c0 Merge 89044a908ed602ae3dee74905866cffd63c164b3 into 2628f579f6246df385acf9203bf2ffb6aedf5ccc
2019-08-08T16:27:18.1205828Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-08-08T16:27:18.1208734Z ==============================================================================
2019-08-08T16:27:18.1208807Z Task         : Bash
2019-08-08T16:27:18.1208854Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-08-08T16:33:16.0921697Z    Compiling serde_json v1.0.40
2019-08-08T16:33:20.5132276Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-08-08T16:33:29.1084788Z     Finished release [optimized] target(s) in 1m 29s
2019-08-08T16:33:29.1146799Z tidy check
2019-08-08T16:33:29.7964285Z tidy error: /checkout/src/librustc_codegen_ssa/back/link.rs:1043: trailing whitespace
2019-08-08T16:33:31.1537551Z some tidy checks failed
2019-08-08T16:33:31.1544921Z 
2019-08-08T16:33:31.1544921Z 
2019-08-08T16:33:31.1546332Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-08-08T16:33:31.1546469Z 
2019-08-08T16:33:31.1546495Z 
2019-08-08T16:33:31.1558006Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-08-08T16:33:31.1558091Z Build completed unsuccessfully in 0:01:32
2019-08-08T16:33:31.1558091Z Build completed unsuccessfully in 0:01:32
2019-08-08T16:33:32.6128003Z ##[error]Bash exited with code '1'.
2019-08-08T16:33:32.6162939Z ##[section]Starting: Checkout
2019-08-08T16:33:32.6164743Z ==============================================================================
2019-08-08T16:33:32.6164941Z Task         : Get sources
2019-08-08T16:33:32.6164985Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@@ -1027,6 +1027,20 @@ fn link_args<'a, B: ArchiveBuilder<'a>>(cmd: &mut dyn Linker,
let t = &sess.target.target;

cmd.include_path(&fix_windows_verbatim_for_gcc(&lib_path));

if t.linker_flavor == LinkerFlavor::Msvc && t.target_vendor == "uwp" {

This comment has been minimized.

Copy link
@alexcrichton

alexcrichton Aug 8, 2019

Member

Can this happen inside get_linker where we're already executing find_tool?


if t.linker_flavor == LinkerFlavor::Msvc && t.target_vendor == "uwp" {
let link_tool = windows_registry::find_tool("x86_64-pc-windows-msvc", "link.exe")
.expect("no path found for link.exe");

This comment has been minimized.

Copy link
@alexcrichton

alexcrichton Aug 8, 2019

Member

This should report errors as first-class errors instead of panics, but for this case I think that all errors should be swallowed and this logic ignored. This could perhaps warn! on errors but it's probably not worthwhile to halt compilation if this fails.

.expect("no path found for link.exe");

let original_path = link_tool.path();
let root_lib_path = original_path.ancestors().skip(4).next().unwrap();

This comment has been minimized.

Copy link
@alexcrichton

alexcrichton Aug 8, 2019

Member

Like above this'll want to have error handling to avoid the unwrap

base.max_atomic_width = Some(64);
base.has_elf_tls = true;

// FIXME: this shouldn't be panic=abort, it should be panic=unwind

This comment has been minimized.

Copy link
@alexcrichton

alexcrichton Aug 8, 2019

Member

The AArch64 Windows backend didn't implement SEH unwinding when the aarch64-pc-windows-msvc target was first added, so I suspect this is the same as that. I haven't checked the LLVM backend recently to see if this works.

@alexcrichton
Copy link
Member

left a comment

Looking good to me, thanks!

@@ -158,6 +159,33 @@ pub fn get_linker(sess: &Session, linker: &Path, flavor: LinkerFlavor) -> (PathB
}
};

let t = &sess.target.target;
if t.linker_flavor == LinkerFlavor::Msvc && t.target_vendor == "uwp" {

This comment has been minimized.

Copy link
@alexcrichton

alexcrichton Aug 12, 2019

Member

This should read the flavor local variable instead of looking this up again

src/librustc_codegen_ssa/back/link.rs Show resolved Hide resolved
@alexcrichton

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

@bors: r+

@bors

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

📌 Commit 1581c43 has been approved by alexcrichton

@Centril Centril modified the milestones: 1.38, 1.39 Aug 13, 2019

Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019

Rollup merge of rust-lang#63155 - mfkl:uwp-msvc, r=alexcrichton
Add UWP MSVC targets

Hi,

- The README URI change is the correct one for VS2019 community edition, which I suspect most people would use. Doesn't _need_ to be merged though.
- This rust-lang@5e6619e fixes the UWP build (msvc or not, doesn't matter). I suspect it broke with recent changes unnoticed because no CI.
- Store lib location is found through the VCToolsInstallDir env variable. The end of the path is currently for the VS2019 store lib locations only.
- I could not test the aarch64_uwp_windows_msvc target because the rust build script does not currently support arm64 msvc AFAIU.

bors added a commit that referenced this pull request Aug 15, 2019

Auto merge of #63583 - Centril:rollup-5s17x9k, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #63155 (Add UWP MSVC targets)
 - #63165 (Add builtin targets for mips64(el)-unknown-linux-muslabi64)
 - #63306 (Adapt AddRetag for shallow retagging)
 - #63470 (Utilize -Zbinary-dep-depinfo in rustbuild)
 - #63491 (Update RLS)
 - #63559 (rustc_codegen_utils: account for 1-indexed anonymous lifetimes in v0 mangling.)
 - #63572 (remove unused Level::PhaseFatal)
 - #63577 (Test HRTB issue accepted by compiler)

Failed merges:

r? @ghost
@bors

This comment has been minimized.

Copy link
Contributor

commented Aug 15, 2019

⌛️ Testing commit 1581c43 with merge d321c2f...

bors added a commit that referenced this pull request Aug 15, 2019

Auto merge of #63155 - mfkl:uwp-msvc, r=alexcrichton
Add UWP MSVC targets

Hi,

- The README URI change is the correct one for VS2019 community edition, which I suspect most people would use. Doesn't _need_ to be merged though.
- This 5e6619e fixes the UWP build (msvc or not, doesn't matter). I suspect it broke with recent changes unnoticed because no CI.
- Store lib location is found through the VCToolsInstallDir env variable. The end of the path is currently for the VS2019 store lib locations only.
- I could not test the aarch64_uwp_windows_msvc target because the rust build script does not currently support arm64 msvc AFAIU.

Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019

Rollup merge of rust-lang#63155 - mfkl:uwp-msvc, r=alexcrichton
Add UWP MSVC targets

Hi,

- The README URI change is the correct one for VS2019 community edition, which I suspect most people would use. Doesn't _need_ to be merged though.
- This rust-lang@5e6619e fixes the UWP build (msvc or not, doesn't matter). I suspect it broke with recent changes unnoticed because no CI.
- Store lib location is found through the VCToolsInstallDir env variable. The end of the path is currently for the VS2019 store lib locations only.
- I could not test the aarch64_uwp_windows_msvc target because the rust build script does not currently support arm64 msvc AFAIU.
@Centril

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

@bors retry rolled up.

bors added a commit that referenced this pull request Aug 15, 2019

Auto merge of #63588 - Centril:rollup-9ad6qs2, r=Centril
Rollup of 12 pull requests

Successful merges:

 - #63155 (Add UWP MSVC targets)
 - #63165 (Add builtin targets for mips64(el)-unknown-linux-muslabi64)
 - #63467 (Add Catalyst (iOS apps running on macOS) target)
 - #63470 (Utilize -Zbinary-dep-depinfo in rustbuild)
 - #63495 ( Remove redundant `ty` fields from `mir::Constant` and `hair::pattern::PatternRange`.)
 - #63525 (Make sure that all file loading happens via SourceMap)
 - #63546 (Remove uses of `mem::uninitialized()` from cloudabi)
 - #63559 (rustc_codegen_utils: account for 1-indexed anonymous lifetimes in v0 mangling.)
 - #63572 (remove unused Level::PhaseFatal)
 - #63577 (Test HRTB issue accepted by compiler)
 - #63582 (Fix ICE #63226)
 - #63586 (cleanup: Remove `Spanned` where possible)

Failed merges:

r? @ghost
@bors

This comment has been minimized.

Copy link
Contributor

commented Aug 15, 2019

⌛️ Testing commit 1581c43 with merge 3f1dd30...

bors added a commit that referenced this pull request Aug 15, 2019

Auto merge of #63155 - mfkl:uwp-msvc, r=alexcrichton
Add UWP MSVC targets

Hi,

- The README URI change is the correct one for VS2019 community edition, which I suspect most people would use. Doesn't _need_ to be merged though.
- This 5e6619e fixes the UWP build (msvc or not, doesn't matter). I suspect it broke with recent changes unnoticed because no CI.
- Store lib location is found through the VCToolsInstallDir env variable. The end of the path is currently for the VS2019 store lib locations only.
- I could not test the aarch64_uwp_windows_msvc target because the rust build script does not currently support arm64 msvc AFAIU.

Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019

Rollup merge of rust-lang#63155 - mfkl:uwp-msvc, r=alexcrichton
Add UWP MSVC targets

Hi,

- The README URI change is the correct one for VS2019 community edition, which I suspect most people would use. Doesn't _need_ to be merged though.
- This rust-lang@5e6619e fixes the UWP build (msvc or not, doesn't matter). I suspect it broke with recent changes unnoticed because no CI.
- Store lib location is found through the VCToolsInstallDir env variable. The end of the path is currently for the VS2019 store lib locations only.
- I could not test the aarch64_uwp_windows_msvc target because the rust build script does not currently support arm64 msvc AFAIU.
@Centril

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

@bors retry rolled up.

bors added a commit that referenced this pull request Aug 15, 2019

Auto merge of #63592 - Centril:rollup-7c6dg3e, r=Centril
Rollup of 9 pull requests

Successful merges:

 - #63155 (Add UWP MSVC targets)
 - #63165 (Add builtin targets for mips64(el)-unknown-linux-muslabi64)
 - #63306 (Adapt AddRetag for shallow retagging)
 - #63467 (Add Catalyst (iOS apps running on macOS) target)
 - #63546 (Remove uses of `mem::uninitialized()` from cloudabi)
 - #63572 (remove unused Level::PhaseFatal)
 - #63577 (Test HRTB issue accepted by compiler)
 - #63582 (Fix ICE #63226)
 - #63586 (cleanup: Remove `Spanned` where possible)

Failed merges:

r? @ghost
@bors

This comment has been minimized.

Copy link
Contributor

commented Aug 15, 2019

⌛️ Testing commit 1581c43 with merge f7af19c...

@bors bors merged commit 1581c43 into rust-lang:master Aug 15, 2019

3 of 5 checks passed

pr (Linux x86_64-gnu-llvm-6.0)
Details
homu Testing commit 1581c43be0dd7ac529e85f0a88f7447a315cb787 with merge f7af19c279b8b7ea3d2c21fcbd67164af8d5d968...
Details
pr Build #20190813.17 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details
@jdm

This comment has been minimized.

Copy link
Contributor

commented Aug 15, 2019

Woo! Thanks for the work to enable this target, and the work to review it everyone!

@SimonSapin SimonSapin referenced this pull request Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.