diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-12-09 03:20:04 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-12-09 03:20:04 +0000 |
commit | 0152e781468a2d5a2feb9630f717836ba7a7ba62 (patch) | |
tree | 48a58ff715b85a4a78d15689182ef454b55889fe /clang/test/Modules/modular_maps.cpp | |
parent | 8e6ec453f118298a419bf16db13185379289eba5 (diff) | |
download | bcm5719-llvm-0152e781468a2d5a2feb9630f717836ba7a7ba62.tar.gz bcm5719-llvm-0152e781468a2d5a2feb9630f717836ba7a7ba62.zip |
[modules] Add experimental -fmodule-map-file-home-is-cwd flag to -cc1.
For files named by -fmodule-map-file=, and files found by 'extern module'
directives, this flag specifies that we should resolve filenames relative to
the current working directory rather than relative to the directory in which
the module map file resides. This is aimed at fixing path handling, in
particular for relative -I paths, when building modules that represent
components of the current project (rather than libraries installed on the
current system, which the current project has as dependencies, where we'd
typically expect the module map files to be looked up implicitly).
llvm-svn: 223753
Diffstat (limited to 'clang/test/Modules/modular_maps.cpp')
-rw-r--r-- | clang/test/Modules/modular_maps.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Modules/modular_maps.cpp b/clang/test/Modules/modular_maps.cpp index 484e727c13e..3b6afc7552d 100644 --- a/clang/test/Modules/modular_maps.cpp +++ b/clang/test/Modules/modular_maps.cpp @@ -1,6 +1,15 @@ // RUN: rm -rf %t +// // RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=%S/Inputs/modular_maps/modulea.map -fmodule-map-file=%S/Inputs/modular_maps/modulec.map -I %S/Inputs/modular_maps %s -verify // RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=%S/Inputs/modular_maps/modulec.map -fmodule-map-file=%S/Inputs/modular_maps/modulea.map -I %S/Inputs/modular_maps %s -verify +// +// RUN: cd %S +// RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=Inputs/modular_maps/modulea.map -fmodule-map-file=Inputs/modular_maps/modulec.map -I Inputs/modular_maps %s -verify +// RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=Inputs/modular_maps/modulec.map -fmodule-map-file=Inputs/modular_maps/modulea.map -I Inputs/modular_maps %s -verify +// +// RUN: cd %S +// RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=Inputs/modular_maps/modulea-cwd.map -fmodule-map-file=Inputs/modular_maps/modulec-cwd.map -I Inputs/modular_maps %s -verify -fmodule-map-file-home-is-cwd +// RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=Inputs/modular_maps/modulec-cwd.map -fmodule-map-file=Inputs/modular_maps/modulea-cwd.map -I Inputs/modular_maps %s -verify -fmodule-map-file-home-is-cwd #include "common.h" #include "a.h" |