================ @@ -21,6 +21,22 @@ // CHECK-NO-PIE-NOT: "-pie" // CHECK-SHARED: "--shared" +// Test the driver supplies an --image-base to the linker only for non-pie +// executables. + +// RUN: %clang --target=x86_64-sie-ps5 -static %s -### 2>&1 | FileCheck --check-prefixes=CHECK-BASE %s +// RUN: %clang --target=x86_64-sie-ps5 -no-pie %s -### 2>&1 | FileCheck --check-prefixes=CHECK-BASE %s + +// CHECK-BASE: {{ld(\.exe)?}}" +// CHECK-BASE-SAME: "--image-base=0x400000" + +// RUN: %clang --target=x86_64-sie-ps5 %s -### 2>&1 | FileCheck --check-prefixes=CHECK-NO-BASE %s +// RUN: %clang --target=x86_64-sie-ps5 -r %s -### 2>&1 | FileCheck --check-prefixes=CHECK-NO-BASE %s +// RUN: %clang --target=x86_64-sie-ps5 -shared %s -### 2>&1 | FileCheck --check-prefixes=CHECK-NO-BASE %s + +// CHECK-NO-BASE: {{ld(\.exe)?}}" +// CHECK-NO-BASE-NOT: "--image-base=0x400000" ---------------- pogo59 wrote:
```suggestion // CHECK-NO-BASE-NOT: --image-base ``` so it will still fail if the number changes. https://github.com/llvm/llvm-project/pull/114435 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits