Browse Source

Fix compile error on x86_64-unknown-uefi target (#331)

* fix compile error on x86_64-unknown-uefi target

* Fix tests on nightly
Runji Wang 5 years ago
parent
commit
9193bbee5d
3 changed files with 2 additions and 5 deletions
  1. 2 2
      src/probestack.rs
  2. 0 2
      testcrate/tests/count_leading_zeros.rs
  3. 0 1
      testcrate/tests/generated.rs

+ 2 - 2
src/probestack.rs

@@ -56,7 +56,7 @@ extern "C" {
 // emitted for the function.
 // emitted for the function.
 //
 //
 // This is the ELF version.
 // This is the ELF version.
-#[cfg(not(target_vendor = "apple"))]
+#[cfg(not(any(target_vendor = "apple", target_os = "uefi")))]
 macro_rules! define_rust_probestack {
 macro_rules! define_rust_probestack {
     ($body: expr) => {
     ($body: expr) => {
         concat!(
         concat!(
@@ -76,7 +76,7 @@ macro_rules! define_rust_probestack {
 }
 }
 
 
 // Same as above, but for Mach-O.
 // Same as above, but for Mach-O.
-#[cfg(target_vendor = "apple")]
+#[cfg(any(target_vendor = "apple", target_os = "uefi"))]
 macro_rules! define_rust_probestack {
 macro_rules! define_rust_probestack {
     ($body: expr) => {
     ($body: expr) => {
         concat!(
         concat!(

+ 0 - 2
testcrate/tests/count_leading_zeros.rs

@@ -1,5 +1,3 @@
-#![feature(compiler_builtins_lib)]
-
 extern crate compiler_builtins;
 extern crate compiler_builtins;
 
 
 use compiler_builtins::int::__clzsi2;
 use compiler_builtins::int::__clzsi2;

+ 0 - 1
testcrate/tests/generated.rs

@@ -1,4 +1,3 @@
-#![feature(compiler_builtins_lib)]
 #![feature(lang_items)]
 #![feature(lang_items)]
 #![allow(bad_style)]
 #![allow(bad_style)]
 #![allow(unused_imports)]
 #![allow(unused_imports)]