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