LLVM's integrated assembler will automatically switch to big objects
when there are more than 2**16 sections.
Patch by Kyra!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290979
91177308-0d34-0410-b5e6-
96231b3b80d8
continue;
}
+ if (C.getDefaultToolChain().getTriple().isOSBinFormatCOFF() &&
+ Value == "-mbig-obj")
+ continue; // LLVM handles bigobj automatically
+
switch (C.getDefaultToolChain().getArch()) {
default:
break;
--- /dev/null
+// RUN: %clang --target=x86_64-windows -c -Wa,-mbig-obj %s 2>&1 | FileCheck %s --check-prefix=WINDOWS
+// RUN: %clang --target=x86_64-windows -c -Xassembler -mbig-obj %s 2>&1 | FileCheck %s --check-prefix=WINDOWS
+// RUN: not %clang --target=x86_64-linux -c -Wa,-mbig-obj %s 2>&1 | FileCheck %s --check-prefix=LINUX
+// RUN: not %clang --target=x86_64-linux -c -Xassembler -mbig-obj %s 2>&1 | FileCheck %s --check-prefix=LINUX
+// WINDOWS-NOT: argument unused during compilation
+// LINUX: unsupported argument '-mbig-obj' to option '{{(Wa,|Xassembler)}}'
+#ifdef _WIN32
+#warning "produce non-empty output for FileCheck"
+#endif