Files
TheRock/compiler/amd-llvm/flang/test/Driver/darwin-version.f90
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

108 lines
5.2 KiB
Fortran

! Based on clang's darwin-version.c test with tests for ios watchos and tvos
! removed
! RUN: %flang -target i686-apple-darwin8 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-OSX4 %s
! RUN: %flang -target i686-apple-darwin9 -mmacos-version-min=10.4 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-OSX4 %s
! CHECK-VERSION-OSX4: "i686-apple-macosx10.4.0"
! RUN: %flang -target i686-apple-darwin9 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-OSX5 %s
! RUN: %flang -target i686-apple-darwin9 -mmacos-version-min=10.5 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-OSX5 %s
! CHECK-VERSION-OSX5: "i686-apple-macosx10.5.0"
! RUN: %flang -target i686-apple-darwin10 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-OSX6 %s
! RUN: %flang -target i686-apple-darwin9 -mmacos-version-min=10.6 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-OSX6 %s
! CHECK-VERSION-OSX6: "i686-apple-macosx10.6.0"
! RUN: %flang -target x86_64-apple-darwin14 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s
! RUN: %flang -target x86_64-apple-darwin -mmacos-version-min=10.10 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s
! RUN: %flang -target x86_64-apple-darwin -mmacos-version-min=10.10 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s
! CHECK-VERSION-OSX10: "x86_64-apple-macosx10.10.0"
! RUN: not %flang -target x86_64-apple-darwin -mmacos-version-min= -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-MISSING %s
! RUN: not %flang -target x86_64-apple-darwin -mmacos-version-min= -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-MISSING %s
! CHECK-VERSION-MISSING: missing version number
! RUN: %flang -target x86_64-apple-driverkit19.0 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-DRIVERKIT190 %s
! CHECK-VERSION-DRIVERKIT190: "x86_64-apple-driverkit19.0.0"
! Check environment variable gets interpreted correctly
! RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 IPHONEOS_DEPLOYMENT_TARGET=2.0 \
! RUN: %flang -target i686-apple-darwin9 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-OSX5 %s
! RUN: env MACOSX_DEPLOYMENT_TARGET=10.4.10 \
! RUN: %flang -target i386-apple-darwin9 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-OSX49 %s
! CHECK-VERSION-OSX49: "i386-apple-macosx10.4.10"
! RUN: env IPHONEOS_DEPLOYMENT_TARGET=2.3.1 \
! Target can specify the OS version:
! RUN: %flang -target x86_64-apple-macos10.11.2 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-TMAC2 %s
! CHECK-VERSION-TMAC2: "x86_64-apple-macosx10.11.2"
! Warn about -m<os>-version-min when it's used with target:
! RUN: %flang -target x86_64-apple-macos10.11.2 -mmacos-version-min=10.6 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV1 %s
! CHECK-VERSION-TNO-OSV1: overriding '-mmacos-version-min=10.6' option with '-target x86_64-apple-macos10.11.2'
! RUN: %flang -target x86_64-apple-macos10.6 -mmacos-version-min=10.6 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-SAME %s
! CHECK-VERSION-TNO-SAME-NOT: overriding
! CHECK-VERSION-TNO-SAME-NOT: argument unused during compilation
! Target with OS version is not overridden by -m<os>-version-min variables:
! RUN: %flang -target x86_64-apple-macos10.11.2 -mmacos-version-min=10.6 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-TIGNORE-OSV1 %s
! CHECK-VERSION-TIGNORE-OSV1: "x86_64-apple-macosx10.11.2"
! Target without OS version includes the OS given by -m<os>-version-min arguments:
! RUN: %flang -target x86_64-apple-macos -mmacos-version-min=10.11 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-USE-OS-ARG1 %s
! CHECK-VERSION-USE-OS-ARG1: "x86_64-apple-macosx10.11.0"
! Target with OS version is not overridden by environment variables:
! RUN: env MACOSX_DEPLOYMENT_TARGET=10.1 \
! RUN: %flang -target i386-apple-macos10.5 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-TMACOS-CMD %s
! CHECK-VERSION-TMACOS-CMD: "i386-apple-macosx10.5.0"
! Target with OS version is not overridden by arch:
! RUN: %flang -target uknown-apple-macos10.11.2 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-VERSION-TIGNORE-ARCH1 %s
! CHECK-VERSION-TIGNORE-ARCH1: "unknown-apple-macosx10.11.2"
! Target can be used to specify the environment:
! RUN: %flang -target x86_64-apple-macos11 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-MACOS11 %s
! RUN: %flang -target x86_64-apple-darwin20 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-MACOS11 %s
! RUN: %flang -target x86_64-apple-darwin -mmacos-version-min=11 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-MACOS11 %s
! CHECK-MACOS11: "x86_64-apple-macosx11.0.0"
! RUN: %flang -target arm64-apple-macosx10.16 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-IMPLICIT-MACOS11 %s
! CHECK-IMPLICIT-MACOS11: warning: overriding deployment version
! CHECK-IMPLICIT-MACOS11: "arm64-apple-macosx11.0.0"
! RUN: %flang -target arm64-apple-macos999 -c %s -### 2>&1 | \
! RUN: FileCheck --check-prefix=CHECK-MACOS999 %s
! CHECK-MACOS999: "arm64-apple-macosx999.0.0"