From b5d9c29d42cfe2f9086f127a97113bdce71ab3ce Mon Sep 17 00:00:00 2001 From: nlewycky Date: Fri, 7 Aug 2020 14:18:01 -0700 Subject: [PATCH] Pass target BinaryFormat through when targeting native object files Co-authored-by: Syrus Akbary --- lib/compiler-llvm/src/config.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/compiler-llvm/src/config.rs b/lib/compiler-llvm/src/config.rs index 19c297600..3c6803a02 100644 --- a/lib/compiler-llvm/src/config.rs +++ b/lib/compiler-llvm/src/config.rs @@ -102,16 +102,7 @@ impl LLVM { // Hack: we're using is_pic to determine whether this is a native // build or not. let binary_format = if self.is_pic { - match target.triple().operating_system { - wasmer_compiler::OperatingSystem::Darwin - | wasmer_compiler::OperatingSystem::MacOSX { - major: _, - minor: _, - patch: _, - } => target_lexicon::BinaryFormat::Macho, - wasmer_compiler::OperatingSystem::Windows => target_lexicon::BinaryFormat::Coff, - _ => target_lexicon::BinaryFormat::Elf, - } + target.triple().binary_format } else { target_lexicon::BinaryFormat::Elf };