summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-04-08 15:14:43 +0000
committerChris Lattner <sabre@nondot.org>2004-04-08 15:14:43 +0000
commit121f09fb0513747c81af30f3ca3308cb1b8b8f95 (patch)
treea37343fcde5263e48b636b4f89a109e4d86a5413 /tools
parent775cbdd51a3b33dd5eb343689f65ab5cc8ac7118 (diff)
downloadllvm-121f09fb0513747c81af30f3ca3308cb1b8b8f95.tar.gz
llvm-121f09fb0513747c81af30f3ca3308cb1b8b8f95.tar.bz2
llvm-121f09fb0513747c81af30f3ca3308cb1b8b8f95.tar.xz
Right, we break strict aliasing requirements. Make sure to disable strict
aliasing in the C compiler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12772 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/gccld/GenerateCode.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp
index d6fad5f774..7a8f54ada0 100644
--- a/tools/gccld/GenerateCode.cpp
+++ b/tools/gccld/GenerateCode.cpp
@@ -176,15 +176,16 @@ int llvm::GenerateCFile(const std::string &OutputFile,
const std::string &InputFile,
const std::string &llc, char ** const envp) {
// Run LLC to convert the bytecode file into C.
- const char *cmd[7];
+ const char *cmd[8];
cmd[0] = llc.c_str();
cmd[1] = "-march=c";
cmd[2] = "-f";
- cmd[3] = "-o";
- cmd[4] = OutputFile.c_str();
- cmd[5] = InputFile.c_str();
- cmd[6] = 0;
+ cmd[3] = "-fno-strict-aliasing";
+ cmd[4] = "-o";
+ cmd[5] = OutputFile.c_str();
+ cmd[6] = InputFile.c_str();
+ cmd[7] = 0;
return ExecWait(cmd, envp);
}