diff options
author | brettw <brettw@chromium.org> | 2015-06-29 16:00:15 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-29 23:01:02 +0000 |
commit | 3dab5fe87ddb0efe646f6ab393ab07533d75237d (patch) | |
tree | 81ca968a3e2cb0bd140cd1de88ad1af8cbab54bd /tools/gn/config_values.h | |
parent | 6cd7b1a4af16d8d5d81d450edc6ac06105ca8f7e (diff) | |
download | chromium_src-3dab5fe87ddb0efe646f6ab393ab07533d75237d.zip chromium_src-3dab5fe87ddb0efe646f6ab393ab07533d75237d.tar.gz chromium_src-3dab5fe87ddb0efe646f6ab393ab07533d75237d.tar.bz2 |
Windows precompiled header support in GN.
Introduces aprecompiled_header_type flag on a tool to say whether it supports precompiled headers, and flags on configs/targets that allow one to specify which header is precompiled.
This does not implement GCC precompiled headers, but the type flag will allow future expansion (the implementation will be mostly separate).
Renames SOURCE_CC to SOURCE_CPP to avoid confusion with Toolchain::TYPE_CC (which is actually the C compiler).
BUG=297678
Review URL: https://codereview.chromium.org/1207903002
Cr-Commit-Position: refs/heads/master@{#336674}
Diffstat (limited to 'tools/gn/config_values.h')
-rw-r--r-- | tools/gn/config_values.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/gn/config_values.h b/tools/gn/config_values.h index dec43c6..64c0acc 100644 --- a/tools/gn/config_values.h +++ b/tools/gn/config_values.h @@ -10,6 +10,7 @@ #include "base/basictypes.h" #include "tools/gn/source_dir.h" +#include "tools/gn/source_file.h" // Holds the values (include_dirs, defines, compiler flags, etc.) for a given // config or target. @@ -39,6 +40,22 @@ class ConfigValues { #undef STRING_VALUES_ACCESSOR #undef DIR_VALUES_ACCESSOR + bool has_precompiled_headers() const { + return !precompiled_header_.empty() || !precompiled_source_.is_null(); + } + const std::string& precompiled_header() const { + return precompiled_header_; + } + void set_precompiled_header(const std::string& f) { + precompiled_header_ = f; + } + const SourceFile& precompiled_source() const { + return precompiled_source_; + } + void set_precompiled_source(const SourceFile& f) { + precompiled_source_ = f; + } + private: std::vector<std::string> cflags_; std::vector<std::string> cflags_c_; @@ -51,6 +68,8 @@ class ConfigValues { std::vector<SourceDir> lib_dirs_; std::vector<std::string> libs_; + std::string precompiled_header_; + SourceFile precompiled_source_; DISALLOW_COPY_AND_ASSIGN(ConfigValues); }; |