return getArch() == llvm::Triple::x86_64;
}
-bool Generic_GCC::isPICDefault() const { return false; }
+bool Generic_GCC::isPICDefault() const {
+ return getArch() == llvm::Triple::x86_64 && getTriple().isOSWindows();
+}
bool Generic_GCC::isPIEDefault() const { return false; }
-bool Generic_GCC::isPICDefaultForced() const { return false; }
+bool Generic_GCC::isPICDefaultForced() const {
+ return getArch() == llvm::Triple::x86_64 && getTriple().isOSWindows();
+}
bool Generic_GCC::IsIntegratedAssemblerDefault() const {
switch (getTriple().getArch()) {
// RUN: | FileCheck %s --check-prefix=CHECK-PIC1
// RUN: %clang -c %s -target arm64-linux-android -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-PIC1
+//
+// On Windows-X64 PIC is enabled by default
+// RUN: %clang -c %s -target x86_64-pc-windows-msvc18.0.0 -### 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-PIC2
+// RUN: %clang -c %s -target x86_64-pc-windows-gnu -### 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-PIC2