Try windows

This commit is contained in:
gnzlbg
2019-07-09 10:03:12 +02:00
committed by gnzlbg
parent dffdd66d81
commit f61cb90d87
3 changed files with 32 additions and 24 deletions
+19 -19
View File
@@ -1,5 +1,5 @@
trigger:
- master
trigger: ["master"]
pr: ["master"]
jobs:
- job: DockerLinux
@@ -118,23 +118,23 @@ jobs:
TARGET: i686-apple-darwin
NO_DOCKER: 1
#- job: Windows
# pool:
# vmImage: vs2017-win2016
# steps:
# - template: ci/azure-install-rust.yml
# - bash: sh ./ci/run.sh $TARGET
# displayName: Execute run.sh
# strategy:
# matrix:
# x86_64-pc-windows-gnu:
# TARGET: x86_64-pc-windows-gnu
# NO_DOCKER: 1
# TOOLCHAIN: nightly
# x86_64-pc-windows-msvc:
# TARGET: x86_64-pc-windows-gnu
# NO_DOCKER: 1
# TOOLCHAIN: nightly
- job: Windows
pool:
vmImage: vs2017-win2016
steps:
- template: ci/azure-install-rust.yml
- bash: sh ./ci/run.sh $TARGET
displayName: Execute run.sh
strategy:
matrix:
x86_64-pc-windows-gnu:
TARGET: x86_64-pc-windows-gnu
x86_64-pc-windows-msvc:
TARGET: x86_64-pc-windows-msvc
i686-pc-windows-gnu:
TARGET: i686-pc-windows-gnu
i686-pc-windows-msvc:
TARGET: i686-pc-windows-msvc
- job: StyleAndDocs
pool:
+2 -4
View File
@@ -17,10 +17,8 @@ steps:
- script: |
@echo on
if not defined TOOLCHAIN set TOOLCHAIN=nightly
echo %TOOLCHAIN%
curl -sSf -o rustup-init.exe https://win.rustup.rs
rustup-init.exe -y --default-toolchain %TOOLCHAIN%-%TARGET%
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
rustup update %TOOLCHAIN%-%TARGET%
rustup default %TOOLCHAIN%-%TARGET%
displayName: Install rust (windows)
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- script: |
@@ -57,7 +57,8 @@ pub(crate) fn disassemble_myself() -> HashSet<Function> {
String::from_utf8_lossy(&output.stderr)
);
assert!(output.status.success());
String::from_utf8(output.stdout)
// Windows does not return valid UTF-8 output:
Ok(String::from_utf8_lossy(&output.stderr).to_string())
} else if cfg!(target_os = "windows") {
panic!("disassembly unimplemented")
} else if cfg!(target_os = "macos") {
@@ -101,6 +102,7 @@ pub(crate) fn disassemble_myself() -> HashSet<Function> {
fn parse(output: &str) -> HashSet<Function> {
let mut lines = output.lines();
println!("First 100 lines of the disassembly input containing {} lines:", lines.clone().count());
for line in output.lines().take(100) {
println!("{}", line);
}
@@ -111,7 +113,9 @@ fn parse(output: &str) -> HashSet<Function> {
if !header.ends_with(':') || !header.contains("stdarch_test_shim") {
continue
}
eprintln!("header: {}", header);
let symbol = normalize(header);
eprintln!("normalized symbol: {}", symbol);
let mut instructions = Vec::new();
while let Some(instruction) = lines.next() {
if instruction.ends_with(':') {
@@ -178,5 +182,11 @@ fn parse(output: &str) -> HashSet<Function> {
};
assert!(functions.insert(function));
}
eprintln!("all found functions dump:");
for k in &functions {
eprintln!(" f: {}", k.name);
}
functions
}