* Take an axe to check_all, instead of trying to find the point where
  it screws up its paths 
* Set version based on port version
* remove usage of -O3

Index: build/gen.py
--- build/gen.py.orig
+++ build/gen.py
@@ -272,7 +272,7 @@ def GenerateLastCommitPosition(host, header, generate_
     commit_id = mo.group(2)
   else:
     num = 0
-    commit_id = "UNKNOWN"
+    commit_id = "${DATE}"
 
   contents = '''// Generated by build/gen.py.
 
@@ -473,28 +473,6 @@ def WriteGenericNinja(path, static_libraries, executab
       ] if options.starlark else []),
   )
 
-  ninja.Phony(
-      'check_all',
-      inputs=[
-          ninja.RunBinary(
-              'check_formatter',
-              inputs=[ninja.source_file('tools/run_formatter.sh')],
-              implicit_inputs=ninja.directory(ninja.source_file('src'), ['target']),
-              args='--diff',
-          ),
-          ninja.RunBinary(
-              'check_reference',
-              inputs=[ninja.source_file('tools/update_reference.sh')],
-              implicit_inputs=[
-                  'gn' + platform.exe_suffix,
-                  ninja.source_file('docs/reference.md'),
-              ],
-              args='--diff',
-              env=f'NOBUILD=1 NINJA_OUT_DIR={os.path.relpath(build_dir, REPO_ROOT)}',
-          ),
-      ],
-  )
-
   if options.gen_target:
     if '=' not in options.gen_target:
       raise ValueError(f'Invalid --gen format: {repr(options.gen_target)}. Expected <src_dir>=<out_dir>')
@@ -567,10 +545,8 @@ def WriteGNNinja(path, platform, host, options, args_l
         cflags.extend(['-D_LIBCPP_DEBUG=1', '-D_GLIBCXX_DEBUG=1'])
     else:
       cflags.append('-DNDEBUG')
-      cflags.append('-O3')
       if options.no_strip:
         cflags.append('-g')
-      ldflags.append('-O3')
       # Use -fdata-sections and -ffunction-sections to place each function
       # or data item into its own section so --gc-sections can eliminate any
       # unused functions and data items.
