diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-11-24 04:22:21 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-11-24 04:22:21 +0000 |
commit | 919ce235665865029d754d9b18fad5d0084aaef1 (patch) | |
tree | 9fbf1ffb708303aa64f490a3f1cd85ff53eeb24d /clang/test/Modules/explicit-build-missing-files.cpp | |
parent | 50668455a72c9ec35b26d76d873b692ac9f21367 (diff) | |
download | bcm5719-llvm-919ce235665865029d754d9b18fad5d0084aaef1.tar.gz bcm5719-llvm-919ce235665865029d754d9b18fad5d0084aaef1.zip |
[modules] Add -cc1 flag -fmodules-embed-all-files.
This flag causes all files that were read by the compilation to be embedded
into a produced module file. This is useful for distributed build systems that
use an include scanning system to determine which files are "needed" by a
compilation, and only provide those files to remote compilation workers. Since
using a module can require any file that is part of that module (or anything it
transitively includes), files that are not found by an include scanner can be
required in a regular build using explicit modules. With this flag, only files
that are actually referenced by transitively-#included files are required to be
present on the build machine.
llvm-svn: 253950
Diffstat (limited to 'clang/test/Modules/explicit-build-missing-files.cpp')
-rw-r--r-- | clang/test/Modules/explicit-build-missing-files.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/Modules/explicit-build-missing-files.cpp b/clang/test/Modules/explicit-build-missing-files.cpp index b2730e4f227..1ee65d9c5e0 100644 --- a/clang/test/Modules/explicit-build-missing-files.cpp +++ b/clang/test/Modules/explicit-build-missing-files.cpp @@ -13,6 +13,9 @@ // RUN: %clang_cc1 -fmodules -I %t -emit-module -fmodule-name=a -x c++ %t/modulemap -o %t/a.pcm \ // RUN: -fmodule-map-file=%t/other.modulemap \ // RUN: -fmodules-embed-file=%t/modulemap -fmodules-embed-file=%t/other.modulemap +// RUN: %clang_cc1 -fmodules -I %t -emit-module -fmodule-name=a -x c++ %t/modulemap -o %t/b.pcm \ +// RUN: -fmodule-map-file=%t/other.modulemap \ +// RUN: -fmodules-embed-all-files // RUN: %clang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm %s // RUN: not %clang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm %s -DERRORS 2>&1 | FileCheck %s // RUN: rm %t/modulemap @@ -27,9 +30,11 @@ // RUN: not %clang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm %s -DERRORS 2>&1 | FileCheck %s // RUN: rm %t/b.h // RUN: %clang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm %s +// RUN: %clang_cc1 -fmodules -I %t -fmodule-file=%t/b.pcm %s // RUN: not %clang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm %s -DERRORS 2>&1 | FileCheck %s --check-prefix=MISSING-B // RUN: rm %t/a.h // RUN: %clang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm %s -verify +// RUN: %clang_cc1 -fmodules -I %t -fmodule-file=%t/b.pcm %s -verify // Oftentimes on Windows there are open handles, and deletion will fail. // REQUIRES: can-remove-opened-file @@ -46,6 +51,6 @@ int y = a2<int>; // MISSING-B-NOT: please delete the module cache #endif -// RUN: not %clang_cc1 -fmodules -I %t -emit-module -fmodule-name=a -x c++ /dev/null -o %t/a.pcm \ +// RUN: not %clang_cc1 -fmodules -I %t -emit-module -fmodule-name=a -x c++ /dev/null -o %t/c.pcm \ // RUN: -fmodules-embed-file=%t/does-not-exist 2>&1 | FileCheck %s --check-prefix=MISSING-EMBED // MISSING-EMBED: fatal error: file '{{.*}}does-not-exist' specified by '-fmodules-embed-file=' not found |