summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-Antoine Ruel <maruel@gmail.com>2021-12-31 07:53:35 -0500
committerMarc-Antoine Ruel <maruel@gmail.com>2021-12-31 09:31:59 -0500
commit054ca7569a42904a11694f222da6a6db7d74da0a (patch)
tree2e06fd8b5deccfd3832b3cad0eea39881ca66103
parentee360022f8a4a540039bbdf7e10a0c7c586a90ce (diff)
downloadninja-054ca7569a42904a11694f222da6a6db7d74da0a.tar.gz
Disable re2c from embedding the version number in the source file
The checked in sources (depfile_parser.cc and lexer.cc) have the re2c version embedded in it. The output didn't change since re2c 1.3, except for the different version number. A reproducible build would use a pinned version of re2c anyway, so there is no need to hardcode its value in the checked in generated files.
-rw-r--r--CMakeLists.txt2
-rwxr-xr-xconfigure.py2
-rw-r--r--src/depfile_parser.cc2
-rw-r--r--src/lexer.cc2
4 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fe1e03f..57ae548 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,7 +39,7 @@ if(RE2C)
# the depfile parser and ninja lexers are generated using re2c.
function(re2c IN OUT)
add_custom_command(DEPENDS ${IN} OUTPUT ${OUT}
- COMMAND ${RE2C} -b -i --no-generation-date -o ${OUT} ${IN}
+ COMMAND ${RE2C} -b -i --no-generation-date --no-version -o ${OUT} ${IN}
)
endfunction()
re2c(${PROJECT_SOURCE_DIR}/src/depfile_parser.in.cc ${PROJECT_BINARY_DIR}/depfile_parser.cc)
diff --git a/configure.py b/configure.py
index e0a5a22..4390434 100755
--- a/configure.py
+++ b/configure.py
@@ -479,7 +479,7 @@ def has_re2c():
return False
if has_re2c():
n.rule('re2c',
- command='re2c -b -i --no-generation-date -o $out $in',
+ command='re2c -b -i --no-generation-date --no-version -o $out $in',
description='RE2C $out')
# Generate the .cc files in the source directory so we can check them in.
n.build(src('depfile_parser.cc'), 're2c', src('depfile_parser.in.cc'))
diff --git a/src/depfile_parser.cc b/src/depfile_parser.cc
index 2eca108..98fba2e 100644
--- a/src/depfile_parser.cc
+++ b/src/depfile_parser.cc
@@ -1,4 +1,4 @@
-/* Generated by re2c 2.2 */
+/* Generated by re2c */
// Copyright 2011 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/src/lexer.cc b/src/lexer.cc
index af861ae..e5729f0 100644
--- a/src/lexer.cc
+++ b/src/lexer.cc
@@ -1,4 +1,4 @@
-/* Generated by re2c 2.2 */
+/* Generated by re2c */
// Copyright 2011 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");