// RUN: -frtlib-add-rpath \
// RUN: | FileCheck --check-prefixes=RESDIR,NO-LIBPATH,NO-RPATH %s
//
-// RESDIR: "-resource-dir" "[[RESDIR:[^ ]*]]"
-// LIBPATH-X86_64: -L[[RESDIR]]/lib/linux/x86_64
-// RPATH-X86_64: "-rpath" "[[RESDIR]]/lib/linux/x86_64"
-// LIBPATH-AArch64: -L[[RESDIR]]/lib/linux/aarch64
-// RPATH-AArch64: "-rpath" "[[RESDIR]]/lib/linux/aarch64"
-// NO-LIBPATH-NOT: -L{{.*}}Inputs/resource_dir
-// NO-RPATH-NOT: "-rpath" {{.*}}/Inputs/resource_dir
+// RESDIR: "-resource-dir" "[[RESDIR:[^"]*]]"
+// LIBPATH-X86_64: -L[[RESDIR]]{{(/|\\\\)lib(/|\\\\)linux(/|\\\\)x86_64}}
+// RPATH-X86_64: "-rpath" "[[RESDIR]]{{(/|\\\\)lib(/|\\\\)linux(/|\\\\)x86_64}}"
+// LIBPATH-AArch64: -L[[RESDIR]]{{(/|\\\\)lib(/|\\\\)linux(/|\\\\)aarch64}}
+// RPATH-AArch64: "-rpath" "[[RESDIR]]{{(/|\\\\)lib(/|\\\\)linux(/|\\\\)aarch64}}"
+// NO-LIBPATH-NOT: -L{{.*Inputs(/|\\\\)resource_dir}}
+// NO-RPATH-NOT: "-rpath" {{.*(/|\\\\)Inputs(/|\\\\)resource_dir}}
// RUN: | FileCheck --check-prefixes=FILEPATH,NO-ARCHDIR %s
//
//
-// FILEPATH: "-x" "c" "[[FILE_PATH:.*]]/{{.*}}.c"
-// ARCHDIR-i386: -L[[FILE_PATH]]/Inputs/resource_dir_with_arch_subdir/lib/linux/i386
-// ARCHDIR-x86_64: -L[[FILE_PATH]]/Inputs/resource_dir_with_arch_subdir/lib/linux/x86_64
-// ARCHDIR-arm: -L[[FILE_PATH]]/Inputs/resource_dir_with_arch_subdir/lib/linux/arm
-// ARCHDIR-aarch64: -L[[FILE_PATH]]/Inputs/resource_dir_with_arch_subdir/lib/linux/aarch64
+// FILEPATH: "-x" "c" "[[FILE_PATH:.*]]{{(/|\\\\).*}}.c"
+// ARCHDIR-i386: -L[[FILE_PATH]]{{(/|\\\\)Inputs(/|\\\\)resource_dir_with_arch_subdir(/|\\\\)lib(/|\\\\)linux(/|\\\\)i386}}
+// ARCHDIR-x86_64: -L[[FILE_PATH]]{{(/|\\\\)Inputs(/|\\\\)resource_dir_with_arch_subdir(/|\\\\)lib(/|\\\\)linux(/|\\\\)x86_64}}
+// ARCHDIR-arm: -L[[FILE_PATH]]{{(/|\\\\)Inputs(/|\\\\)resource_dir_with_arch_subdir(/|\\\\)lib(/|\\\\)linux(/|\\\\)arm}}
+// ARCHDIR-aarch64: -L[[FILE_PATH]]{{(/|\\\\)Inputs(/|\\\\)resource_dir_with_arch_subdir(/|\\\\)lib(/|\\\\)linux(/|\\\\)aarch64}}
//
// Have a stricter check for no-archdir - that the driver doesn't add any
// subdirectory from the provided resource directory.