From a779a9899a5e23bd5198973f4709d66cb4bc2e64 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 5 May 2008 00:28:39 +0000 Subject: Add AsmPrinter support for emitting a directive to declare that the code being generated does not require an executable stack. Also, add target-specific code to make use of this on Linux on x86. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50634 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86Subtarget.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/Target/X86/X86Subtarget.cpp') diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index e0f350c..e555079 100644 --- a/lib/Target/X86/X86Subtarget.cpp +++ b/lib/Target/X86/X86Subtarget.cpp @@ -278,6 +278,8 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS, bool is64Bit) DarwinVers = atoi(&TT[Pos+7]); else DarwinVers = 8; // Minimum supported darwin is Tiger. + } else if (TT.find("linux") != std::string::npos) { + TargetType = isELFLinux; } else if (TT.find("cygwin") != std::string::npos) { TargetType = isCygwin; } else if (TT.find("mingw") != std::string::npos) { @@ -302,6 +304,9 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS, bool is64Bit) #elif defined(_WIN32) || defined(_WIN64) TargetType = isWindows; +#elif defined(__linux__) + // Linux doesn't imply ELF, but we don't currently support anything else. + TargetType = isELFLinux; #endif } -- cgit v1.1