Skip to content

Commit a9360b8

Browse files
committed
Try windows
1 parent 713f941 commit a9360b8

File tree

3 files changed

+32
-24
lines changed

3 files changed

+32
-24
lines changed

azure-pipelines.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
trigger:
2-
- master
1+
trigger: ["master"]
2+
pr: ["master"]
33

44
jobs:
55
- job: DockerLinux
@@ -118,23 +118,23 @@ jobs:
118118
TARGET: i686-apple-darwin
119119
NO_DOCKER: 1
120120

121-
#- job: Windows
122-
# pool:
123-
# vmImage: vs2017-win2016
124-
# steps:
125-
# - template: ci/azure-install-rust.yml
126-
# - bash: sh ./ci/run.sh $TARGET
127-
# displayName: Execute run.sh
128-
# strategy:
129-
# matrix:
130-
# x86_64-pc-windows-gnu:
131-
# TARGET: x86_64-pc-windows-gnu
132-
# NO_DOCKER: 1
133-
# TOOLCHAIN: nightly
134-
# x86_64-pc-windows-msvc:
135-
# TARGET: x86_64-pc-windows-gnu
136-
# NO_DOCKER: 1
137-
# TOOLCHAIN: nightly
121+
- job: Windows
122+
pool:
123+
vmImage: vs2017-win2016
124+
steps:
125+
- template: ci/azure-install-rust.yml
126+
- bash: sh ./ci/run.sh $TARGET
127+
displayName: Execute run.sh
128+
strategy:
129+
matrix:
130+
x86_64-pc-windows-gnu:
131+
TARGET: x86_64-pc-windows-gnu
132+
x86_64-pc-windows-msvc:
133+
TARGET: x86_64-pc-windows-msvc
134+
i686-pc-windows-gnu:
135+
TARGET: i686-pc-windows-gnu
136+
i686-pc-windows-msvc:
137+
TARGET: i686-pc-windows-msvc
138138

139139
- job: StyleAndDocs
140140
pool:

ci/azure-install-rust.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ steps:
1717
- script: |
1818
@echo on
1919
if not defined TOOLCHAIN set TOOLCHAIN=nightly
20-
echo %TOOLCHAIN%
21-
curl -sSf -o rustup-init.exe https://win.rustup.rs
22-
rustup-init.exe -y --default-toolchain %TOOLCHAIN%-%TARGET%
23-
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
20+
rustup update %TOOLCHAIN%-%TARGET%
21+
rustup default %TOOLCHAIN%-%TARGET%
2422
displayName: Install rust (windows)
2523
condition: eq( variables['Agent.OS'], 'Windows_NT' )
2624
- script: |

crates/stdarch-test/src/disassembly.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ pub(crate) fn disassemble_myself() -> HashSet<Function> {
5757
String::from_utf8_lossy(&output.stderr)
5858
);
5959
assert!(output.status.success());
60-
String::from_utf8(output.stdout)
60+
// Windows does not return valid UTF-8 output:
61+
Ok(String::from_utf8_lossy(&output.stderr).to_string())
6162
} else if cfg!(target_os = "windows") {
6263
panic!("disassembly unimplemented")
6364
} else if cfg!(target_os = "macos") {
@@ -101,6 +102,7 @@ pub(crate) fn disassemble_myself() -> HashSet<Function> {
101102
fn parse(output: &str) -> HashSet<Function> {
102103
let mut lines = output.lines();
103104

105+
println!("First 100 lines of the disassembly input containing {} lines:", lines.clone().count());
104106
for line in output.lines().take(100) {
105107
println!("{}", line);
106108
}
@@ -111,7 +113,9 @@ fn parse(output: &str) -> HashSet<Function> {
111113
if !header.ends_with(':') || !header.contains("stdarch_test_shim") {
112114
continue
113115
}
116+
eprintln!("header: {}", header);
114117
let symbol = normalize(header);
118+
eprintln!("normalized symbol: {}", symbol);
115119
let mut instructions = Vec::new();
116120
while let Some(instruction) = lines.next() {
117121
if instruction.ends_with(':') {
@@ -178,5 +182,11 @@ fn parse(output: &str) -> HashSet<Function> {
178182
};
179183
assert!(functions.insert(function));
180184
}
185+
186+
eprintln!("all found functions dump:");
187+
for k in &functions {
188+
eprintln!(" f: {}", k.name);
189+
}
190+
181191
functions
182192
}

0 commit comments

Comments
 (0)