brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · e850939 Raw
27 lines · plain
1! Verify that certain linker flags are known to the frontend and are passed on2! to the linker.3 4! RUN: %flang -### --target=x86_64-linux-gnu -rpath /path/to/dir -shared \5! RUN:     -static %s 2>&1 | FileCheck \6! RUN:     --check-prefixes=GNU-LINKER-OPTIONS \7! RUN:     --implicit-check-not=GNU-LINKER-OPTIONS-NOT %s8! RUN: %flang -### --target=x86_64-windows-msvc -rpath /path/to/dir -shared \9! RUN:     -static %s 2>&1 | FileCheck \10! RUN:     --check-prefixes=MSVC-LINKER-OPTIONS \11! RUN:     --implicit-check-not=MSVC-LINKER-OPTIONS-NOT %s12! RUN: %flang -### --target=aarch64-linux-none -rdynamic %s 2>&1 | FileCheck --check-prefixes=RDYNAMIC-LINKER-OPTION %s13 14! TODO: Could the linker have an extension or a suffix?15! GNU-LINKER-OPTIONS: "{{.*}}ld{{(.exe)?}}"16! GNU-LINKER-OPTIONS-SAME: "-shared"17! GNU-LINKER-OPTIONS-SAME: "-static"18! GNU-LINKER-OPTIONS-SAME: "-rpath" "/path/to/dir"19 20! RDYNAMIC-LINKER-OPTION: "{{.*}}ld{{(\.lld)?(\.exe)?}}"21! RDYNAMIC-LINKER-OPTION-SAME: "-export-dynamic"22 23! For MSVC, adding -static does not add any additional linker options.24! MSVC-LINKER-OPTIONS: "{{.*}}link{{(.exe)?}}"25! MSVC-LINKER-OPTIONS-SAME: "-dll"26! MSVC-LINKER-OPTIONS-SAME: "-rpath" "/path/to/dir"27