15 lines · plain
1! Verify that the -isysroot flag is known to the frontend and, on Darwin,2! is passed on to the linker.3 4! When DEFAULT_SYSROOT is set -isysroot has no effect.5! REQUIRES: !default_sysroot6! RUN: %flang -### --target=aarch64-apple-darwin -isysroot /path/to/sysroot \7! RUN: %s 2>&1 | FileCheck %s --check-prefix=CHECK-DARWIN8! RUN: %flang -### --target=aarch64-linux-gnu -isysroot /path/to/sysroot \9! RUN: %s 2>&1 | FileCheck %s --check-prefix=CHECK-LINUX10 11! CHECK-DARWIN: "{{.*}}ld{{(64)?(\.lld)?(\.exe)?}}" {{.*}}"-syslibroot" "/path/to/sysroot"12! Unused on Linux.13! CHECK-LINUX: warning: argument unused during compilation: '-isysroot /path/to/sysroot'14! CHECK-LINUX-NOT: /path/to/sysroot15