1 // REQUIRES: shell 2 // 3 // RUN: cd %S 4 // RUN: rm -rf %t 5 // RUN: mkdir %t 6 // 7 // RUN: %clang_cc1 -cc1 -fmodule-name=relative-dep-gen -emit-module -x c++ Inputs/relative-dep-gen.modulemap -dependency-file %t/build.d -MT mod.pcm -o %t/mod.pcm 8 // RUN: %clang_cc1 -cc1 -fmodule-map-file=Inputs/relative-dep-gen.modulemap -fmodule-file=%t/mod.pcm -dependency-file %t/use-explicit.d -MT use.o relative-dep-gen.cpp -fsyntax-only 9 // RUN: %clang_cc1 -cc1 -fmodule-map-file=Inputs/relative-dep-gen.modulemap -dependency-file %t/use-implicit.d relative-dep-gen.cpp -MT use.o -fsyntax-only 10 // 11 // RUN: FileCheck --check-prefix=CHECK-BUILD %s < %t/build.d 12 // RUN: FileCheck --check-prefix=CHECK-USE %s < %t/use-explicit.d 13 // RUN: FileCheck --check-prefix=CHECK-USE %s < %t/use-implicit.d 14 // 15 // RUN: %clang_cc1 -cc1 -fmodule-name=relative-dep-gen -emit-module -x c++ Inputs/relative-dep-gen-cwd.modulemap -dependency-file %t/build-cwd.d -MT mod.pcm -o %t/mod-cwd.pcm -fmodule-map-file-home-is-cwd 16 // RUN: %clang_cc1 -cc1 -fmodule-map-file=Inputs/relative-dep-gen-cwd.modulemap -fmodule-file=%t/mod-cwd.pcm -dependency-file %t/use-explicit-cwd.d -MT use.o relative-dep-gen.cpp -fsyntax-only -fmodule-map-file-home-is-cwd 17 // RUN: %clang_cc1 -cc1 -fmodule-map-file=Inputs/relative-dep-gen-cwd.modulemap -dependency-file %t/use-implicit-cwd.d relative-dep-gen.cpp -MT use.o -fsyntax-only -fmodule-map-file-home-is-cwd 18 // 19 // RUN: FileCheck --check-prefix=CHECK-BUILD %s < %t/build-cwd.d 20 // RUN: FileCheck --check-prefix=CHECK-USE %s < %t/use-explicit-cwd.d 21 // RUN: FileCheck --check-prefix=CHECK-USE %s < %t/use-implicit-cwd.d 22 23 #include "Inputs/relative-dep-gen-1.h" 24 25 // CHECK-BUILD: mod.pcm: Inputs/relative-dep-gen-1.h Inputs/relative-dep-gen-2.h 26 // CHECK-USE: use.o: relative-dep-gen.cpp Inputs/relative-dep-gen-1.h 27