aboutsummaryrefslogtreecommitdiff
path: root/src/kconfig_compiler/kconfig_compiler.cpp
diff options
context:
space:
mode:
authorScarlett Clark <scarlett@scarlettgatelyclark.com>2016-06-22 09:07:44 -0700
committerScarlett Clark <scarlett@scarlettgatelyclark.com>2016-06-22 09:07:44 -0700
commit9b72ca60e8c0ada4256ee22f3ed5b45717ccc368 (patch)
tree30df787e4c994c98616ae5b294b87f7ef300690e /src/kconfig_compiler/kconfig_compiler.cpp
parent6a16866e9901e4f3bbdbb95a0f018b4854b4131a (diff)
downloadkconfig-9b72ca60e8c0ada4256ee22f3ed5b45717ccc368.tar.gz
kconfig-9b72ca60e8c0ada4256ee22f3ed5b45717ccc368.tar.bz2
Fix reproducibility in builds by ensuring utf-8 encoding.
REVIEW:128102 Set encoding on kconfig_compiler generated cpp and headers to utf-8 ( reproducible builds ) Under certain locals non standard characters will get dropped making builds un reproducible. Setting the encoding to utf-8 on the files makes all builds reproducible no matter what ( or none ) locale is in use. Thereby making the build reproducible.
Diffstat (limited to 'src/kconfig_compiler/kconfig_compiler.cpp')
-rw-r--r--src/kconfig_compiler/kconfig_compiler.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kconfig_compiler/kconfig_compiler.cpp b/src/kconfig_compiler/kconfig_compiler.cpp
index ea68fec6..8bcaaf35 100644
--- a/src/kconfig_compiler/kconfig_compiler.cpp
+++ b/src/kconfig_compiler/kconfig_compiler.cpp
@@ -1755,6 +1755,8 @@ int main(int argc, char **argv)
QTextStream h(&header);
+ h.setCodec("utf-8");
+
h << "// This file is generated by kconfig_compiler_kf5 from " << QFileInfo(inputFilename).fileName() << "." << endl;
h << "// All changes you do to this file will be lost." << endl;
@@ -2216,6 +2218,8 @@ int main(int argc, char **argv)
QTextStream cpp(&implementation);
+ cpp.setCodec("utf-8");
+
cpp << "// This file is generated by kconfig_compiler_kf5 from " << QFileInfo(inputFilename).fileName() << "." << endl;
cpp << "// All changes you do to this file will be lost." << endl << endl;