Remove the remaining old-style asm lists

I think there are a couple projects remaining that still use the old
lists here, but they're in repositories we don't spend as much time in,
and it should be straightforward for them to update when they get here.

Removing these should put us in a good place to check in pre-generated
asm lists. While I'm here, fix a few typos in TODOs I previously added.

Update-Note: If you're one of those projects and have trouble switching
to the new lists, let us know.

Bug: 542
Change-Id: I57559bafc85eceacc7a237e2f29db6eaf492a8cb
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/62186
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/util/generate_build_files.py b/util/generate_build_files.py
index b3ce2d3..d7ae8b1 100644
--- a/util/generate_build_files.py
+++ b/util/generate_build_files.py
@@ -26,7 +26,7 @@
 # OS_ARCH_COMBOS maps from OS and platform to the OpenSSL assembly "style" for
 # that platform and the extension used by asm files.
 #
-# TODO(https://crbug.com/boringssl/524): This probably should be a map, but some
+# TODO(https://crbug.com/boringssl/542): This probably should be a map, but some
 # downstream scripts import this to find what folders to add/remove from git.
 OS_ARCH_COMBOS = [
     ('apple', 'arm', 'ios32', [], 'S'),
@@ -106,7 +106,7 @@
       out.write('  %s\\\n' % f)
     out.write('\n')
 
-  def WriteFiles(self, files, asm_outputs):
+  def WriteFiles(self, files):
     # New Android.bp format
     with open('sources.bp', 'w+') as blueprint:
       blueprint.write(self.header.replace('#', '//'))
@@ -204,7 +204,7 @@
       out.write('  ${BORINGSSL_ROOT}%s\n' % f)
     out.write(')\n')
 
-  def WriteFiles(self, files, asm_outputs):
+  def WriteFiles(self, files):
     # The Android emulator uses a custom CMake buildsystem.
     #
     # TODO(crbug.com/boringssl/542): Move our various source lists into
@@ -245,7 +245,7 @@
       out.write('    "%s",\n' % PathOf(f))
     out.write(']\n')
 
-  def WriteFiles(self, files, asm_outputs):
+  def WriteFiles(self, files):
     with open('BUILD.generated.bzl', 'w+') as out:
       out.write(self.header)
 
@@ -306,7 +306,7 @@
       out.write('  %s\\\n' % f)
     out.write('\n')
 
-  def WriteFiles(self, files, asm_outputs):
+  def WriteFiles(self, files):
     # Legacy Android.mk format
     with open('eureka.mk', 'w+') as makefile:
       makefile.write(self.header)
@@ -319,14 +319,6 @@
       self.PrintVariableSection(makefile, 'ssl_sources', files['ssl'])
       self.PrintVariableSection(makefile, 'tool_sources', files['tool'])
 
-      # TODO(crbug.com/boringssl/542): Migrate users to the combined asm source
-      # lists, so we don't need to generate both sets.
-      for ((osname, arch), asm_files) in asm_outputs:
-        if osname != 'linux':
-          continue
-        self.PrintVariableSection(
-            makefile, '%s_%s_sources' % (osname, arch), asm_files)
-
 
 class GN(object):
 
@@ -347,7 +339,7 @@
       out.write('  "%s",\n' % f)
     out.write(']\n')
 
-  def WriteFiles(self, files, asm_outputs):
+  def WriteFiles(self, files):
     with open('BUILD.generated.gni', 'w+') as out:
       out.write(self.header)
 
@@ -397,7 +389,7 @@
       out.write('      \'%s\',\n' % f)
     out.write('    ],\n')
 
-  def WriteFiles(self, files, asm_outputs):
+  def WriteFiles(self, files):
     with open('boringssl.gypi', 'w+') as gypi:
       gypi.write(self.header + '{\n  \'variables\': {\n')
 
@@ -412,12 +404,6 @@
       self.PrintVariableSection(gypi, 'boringssl_crypto_nasm_sources',
                                 files['crypto_nasm'])
 
-      # TODO(crbug.com/boringssl/542): Migrate users to the combined asm source
-      # lists, so we don't need to generate both sets.
-      for ((osname, arch), asm_files) in asm_outputs:
-        self.PrintVariableSection(gypi, 'boringssl_%s_%s_sources' %
-                                  (osname, arch), asm_files)
-
       gypi.write('  }\n}\n')
 
 class CMake(object):
@@ -522,7 +508,7 @@
       out.write('  %s\n' % PathOf(f))
     out.write(')\n\n')
 
-  def WriteFiles(self, files, asm_outputs):
+  def WriteFiles(self, files):
     with open('CMakeLists.txt', 'w+') as cmake:
       cmake.write(self.header)
 
@@ -558,7 +544,7 @@
 ''')
 
 class JSON(object):
-  def WriteFiles(self, files, asm_outputs):
+  def WriteFiles(self, files):
     with open('sources.json', 'w+') as f:
       json.dump(files, f, sort_keys=True, indent=2)
 
@@ -703,7 +689,7 @@
     for (osname, arch, perlasm_style, extra_args, asm_ext) in OS_ARCH_COMBOS:
       if arch != perlasm['arch']:
         continue
-      # TODO(https://crbug.com/boringssl/524): Now that we incorporate osname in
+      # TODO(https://crbug.com/boringssl/542): Now that we incorporate osname in
       # the output filename, the asm files can just go in a single directory.
       # For now, we keep them in target-specific directories to avoid breaking
       # downstream scripts.
@@ -816,11 +802,13 @@
 
   asm_outputs = sorted(WriteAsmFiles(ReadPerlAsmOperations()).items())
 
-  # Generate combined source lists for gas and nasm. Build files have a choice
-  # of using the per-platform ones or the combined ones. In the combined mode,
-  # Windows x86 and Windows x86_64 must still be special-cased, but otherwise
-  # all assembly files can be linked together. Some files appear in multiple
-  # per-platform lists, so we duplicate.
+  # Generate combined source lists for gas and nasm. Some files appear in
+  # multiple per-platform lists, so we de-duplicate.
+  #
+  # TODO(https://crbug.com/boringssl/542): It would be simpler to build the
+  # combined source lists directly. This is a remnant of the previous assembly
+  # strategy. When we move to pre-generated assembly files, this will be
+  # removed.
   asm_sources = set()
   nasm_sources = set()
   for ((osname, arch), asm_files) in asm_outputs:
@@ -856,7 +844,7 @@
   }
 
   for platform in platforms:
-    platform.WriteFiles(files, asm_outputs)
+    platform.WriteFiles(files)
 
   return 0