Merge "Roll prebuilts for v39.0" into main
diff --git a/BUILD.gn b/BUILD.gn
index 181bfbd..63b418e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -319,8 +319,8 @@
   # In Chromium, we want to ensure that we don't link dynamically against sqlite
   # (as Chromium also uses a more restricted version of sqlite which is actually
   # shipped to the users).
-  # static_library helps us to achieve that.
-  static_library("libtrace_processor") {
+  # source_set helps us to achieve that.
+  source_set("libtrace_processor") {
     public_configs = [ "gn:public_config" ]
     deps = [ "src/trace_processor:lib" ]
     configs -= [ "//build/config/compiler:chromium_code" ]
diff --git a/python/generators/sql_processing/utils.py b/python/generators/sql_processing/utils.py
index f5c6a2c..0a05a71 100644
--- a/python/generators/sql_processing/utils.py
+++ b/python/generators/sql_processing/utils.py
@@ -173,7 +173,7 @@
 
 # Given SQL string check whether there is (not allowlisted) usage of
 # CREATE TABLE {name} AS.
-def check_banned_create_table_as(sql: str, filename: str,
+def check_banned_create_table_as(sql: str, filename: str, stdlib_path: str,
                                  allowlist: Dict[str, List[str]]) -> List[str]:
   errors = []
   for _, matches in match_pattern(CREATE_TABLE_AS_PATTERN, sql).items():
@@ -182,33 +182,13 @@
     # work on Windows for the Chrome stdlib presubmit.
     allowlist_normpath = dict(
         (os.path.normpath(path), tables) for path, tables in allowlist.items())
-    if os.path.normpath(filename) not in allowlist_normpath:
-      errors.append(f"CREATE TABLE '{name}' is deprecated."
-                    "Use CREATE PERFETTO TABLE instead.\n"
-                    f"Offending file: {filename}\n")
-      continue
-    if name not in allowlist_normpath[os.path.normpath(filename)]:
-      errors.append(
-          f"Table '{name}' uses CREATE TABLE which is deprecated "
-          "and this table is not allowlisted. Use CREATE PERFETTO TABLE.\n"
-          f"Offending file: {filename}\n")
-  return errors
-
-
-# Given SQL string check whether there is (not allowlisted) usage of
-# CREATE TABLE {name} AS.
-def check_banned_create_table_as(sql: str, filename: str, stdlib_path: str,
-                                 allowlist: Dict[str, List[str]]) -> List[str]:
-  errors = []
-  for _, matches in match_pattern(CREATE_TABLE_AS_PATTERN, sql).items():
-    name = matches[0]
-    allowlist_key = filename[len(stdlib_path):]
-    if allowlist_key not in allowlist:
+    allowlist_key = os.path.normpath(filename[len(stdlib_path):])
+    if allowlist_key not in allowlist_normpath:
       errors.append(f"CREATE TABLE '{name}' is deprecated. "
                     "Use CREATE PERFETTO TABLE instead.\n"
                     f"Offending file: {filename}\n")
       continue
-    if name not in allowlist[allowlist_key]:
+    if name not in allowlist_normpath[allowlist_key]:
       errors.append(
           f"Table '{name}' uses CREATE TABLE which is deprecated "
           "and this table is not allowlisted. Use CREATE PERFETTO TABLE.\n"