From 803d16ee847652d126261467b9f3488c6c48de45 Mon Sep 17 00:00:00 2001 From: Jordan Rhee Date: Wed, 27 Feb 2019 11:39:49 -0800 Subject: [PATCH 1/2] Fix undefined symbol errors on windows/arm Fix undefined symbol linker errors when building rust for windows/arm by excluding unneeded symbols. The errors are: = note: lib.def : error LNK2001: unresolved external symbol __aeabi_memclr4 lib.def : error LNK2001: unresolved external symbol __aeabi_memclr8 lib.def : error LNK2001: unresolved external symbol __aeabi_memmove4 lib.def : error LNK2001: unresolved external symbol __aeabi_memmove8 --- src/arm.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/arm.rs b/src/arm.rs index 9e43aec..9bfffb7 100644 --- a/src/arm.rs +++ b/src/arm.rs @@ -164,14 +164,14 @@ pub unsafe extern "aapcs" fn __aeabi_memmove(dest: *mut u8, src: *const u8, n: u ::mem::memmove(dest, src, n); } -#[cfg(not(target_os = "ios"))] +#[cfg(not(any(target_os = "ios", target_env = "msvc")))] #[cfg_attr(not(feature = "mangled-names"), no_mangle)] #[cfg_attr(thumb, linkage = "weak")] pub unsafe extern "aapcs" fn __aeabi_memmove4(dest: *mut u8, src: *const u8, n: usize) { __aeabi_memmove(dest, src, n); } -#[cfg(not(target_os = "ios"))] +#[cfg(not(any(target_os = "ios", target_env = "msvc")))] #[cfg_attr(not(feature = "mangled-names"), no_mangle)] #[cfg_attr(thumb, linkage = "weak")] pub unsafe extern "aapcs" fn __aeabi_memmove8(dest: *mut u8, src: *const u8, n: usize) { @@ -220,14 +220,14 @@ pub unsafe extern "aapcs" fn __aeabi_memclr(dest: *mut u8, n: usize) { __aeabi_memset(dest, n, 0); } -#[cfg(not(target_os = "ios"))] +#[cfg(not(any(target_os = "ios", target_env = "msvc")))] #[cfg_attr(not(feature = "mangled-names"), no_mangle)] #[cfg_attr(thumb, linkage = "weak")] pub unsafe extern "aapcs" fn __aeabi_memclr4(dest: *mut u8, n: usize) { __aeabi_memset4(dest, n, 0); } -#[cfg(not(target_os = "ios"))] +#[cfg(not(any(target_os = "ios", target_env = "msvc")))] #[cfg_attr(not(feature = "mangled-names"), no_mangle)] #[cfg_attr(thumb, linkage = "weak")] pub unsafe extern "aapcs" fn __aeabi_memclr8(dest: *mut u8, n: usize) { From 18cd30009c689df30286c1239806b98d9dcabff0 Mon Sep 17 00:00:00 2001 From: Jordan Rhee Date: Wed, 27 Feb 2019 11:45:14 -0800 Subject: [PATCH 2/2] Bump version to 0.1.6 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index de2996b..44dabad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["Jorge Aparicio "] name = "compiler_builtins" -version = "0.1.5" +version = "0.1.6" license = "MIT/Apache-2.0" readme = "README.md" repository = "https://github.com/rust-lang-nursery/compiler-builtins"