zos: build with -DZOSLIB_OVERRIDE_CLIB to override creat The overridden creat() in zoslib, enabled by the subject macro, creates a file as ISO8859-1 and tags it as text, so user no longer has to chtag the generated build files manually, as was previously instructed in the initial z/OS port (commit 45aa842fb4). Note: the macro also overrides other C runtime library functions (e.g. open, fopen, pipe, etc.), but these continue to function correctly. The only file that will still be tagged as mixed binary and text (at least in V8's gn-generated files) is toolchain.ninja (m ISO8859-1 instead of t ISO8859-1), because of the std::ios_base::binary in NinjaToolchainWriter::RunAndWriteFile's std::ofstream open(). However, zopen's vim, grep and ninja can still read it fine. zoslib: https://github.com/ibmruntimes/zoslib zopen: https://github.com/ZOSOpenTools/ Change-Id: Iaf3d8e7f622bdf7d9de5db4b92380ddf93ae9155 Reviewed-on: https://gn-review.googlesource.com/c/gn/+/16280 Reviewed-by: Takuto Ikuta <tikuta@google.com> Reviewed-by: Dirk Pranke <dpranke@google.com> Commit-Queue: Takuto Ikuta <tikuta@google.com>
diff --git a/build/gen.py b/build/gen.py index 3364cb9..a463920 100755 --- a/build/gen.py +++ b/build/gen.py
@@ -522,6 +522,7 @@ cflags.append('-Wno-unused-function') cflags.append('-D_OPEN_SYS_FILE_EXT') cflags.append('-DPATH_MAX=1024') + cflags.append('-DZOSLIB_OVERRIDE_CLIB') if platform.is_posix() and not platform.is_haiku(): ldflags.append('-pthread')