diff options
author | David Terei <davidterei@gmail.com> | 2010-06-18 13:17:33 +0000 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2010-06-18 13:17:33 +0000 |
commit | a0e32f1151a9bc765527bd9ee48a54a27ce1750e (patch) | |
tree | fb6fc84ed394a8da19b0f42d8829b8c697cc4c2b /compiler/llvmGen | |
parent | f4e82828c43302ce4ccc02a2978852106e6f8056 (diff) | |
download | haskell-a0e32f1151a9bc765527bd9ee48a54a27ce1750e.tar.gz |
Add win32 datalayout support to llvm backend
Diffstat (limited to 'compiler/llvmGen')
-rw-r--r-- | compiler/llvmGen/LlvmCodeGen/Ppr.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/llvmGen/LlvmCodeGen/Ppr.hs b/compiler/llvmGen/LlvmCodeGen/Ppr.hs index cdf968afb3..689be6c66c 100644 --- a/compiler/llvmGen/LlvmCodeGen/Ppr.hs +++ b/compiler/llvmGen/LlvmCodeGen/Ppr.hs @@ -28,12 +28,15 @@ import Util -- | LLVM module layout description for the host target moduleLayout :: Doc moduleLayout = -#ifdef i386_TARGET_ARCH +#if i386_TARGET_ARCH -#ifdef darwin_TARGET_OS +#if darwin_TARGET_OS text "target datalayout = \"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128\"" $+$ text "target triple = \"i386-apple-darwin9.8\"" -#else +#elif mingw32_TARGET_OS + text "target datalayout = \"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32\"" + $+$ text "target triple = \"i686-pc-win32\"" +#else /* Linux */ text "target datalayout = \"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32\"" $+$ text "target triple = \"i386-linux-gnu\"" #endif |