GN: Fix bootstrap.py on mac

R=brettw@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1895413005

Cr-Original-Commit-Position: refs/heads/master@{#388548}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: edafde65ae1b3e753dfabdaaffddafacd6e44805
diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
index f198833..523a3c0 100755
--- a/tools/gn/bootstrap/bootstrap.py
+++ b/tools/gn/bootstrap/bootstrap.py
@@ -118,18 +118,18 @@
   root_gen_dir = os.path.join(tempdir, 'gen')
   mkdir_p(root_gen_dir)
 
-  if is_linux:
-    mkdir_p(os.path.join(root_gen_dir, 'base', 'allocator'))
-    with tempfile.NamedTemporaryFile() as f:
-      f.write('--flags USE_EXPERIMENTAL_ALLOCATOR_SHIM=true')
-      f.flush()
+  mkdir_p(os.path.join(root_gen_dir, 'base', 'allocator'))
+  with tempfile.NamedTemporaryFile() as f:
+    f.write('--flags USE_EXPERIMENTAL_ALLOCATOR_SHIM=%s'
+            % ('true' if is_linux else 'false'))
+    f.flush()
 
-      check_call([
-          os.path.join(SRC_ROOT, 'build', 'write_buildflag_header.py'),
-          '--output', 'base/allocator/features.h',
-          '--gen-dir', root_gen_dir,
-          '--definitions', f.name,
-      ])
+    check_call([
+        os.path.join(SRC_ROOT, 'build', 'write_buildflag_header.py'),
+        '--output', 'base/allocator/features.h',
+        '--gen-dir', root_gen_dir,
+        '--definitions', f.name,
+    ])
 
   if is_mac:
     # //base/build_time.cc needs base/generated_build_date.h,
@@ -198,8 +198,8 @@
       'base/third_party/superfasthash/superfasthash.c',
   ])
   static_libraries['base']['sources'].extend([
+      'base/allocator/allocator_check.cc',
       'base/allocator/allocator_extension.cc',
-      'base/allocator/allocator_shim.cc',
       'base/at_exit.cc',
       'base/base_paths.cc',
       'base/base_switches.cc',
@@ -385,6 +385,7 @@
         'tool': 'cxx',
     }
     static_libraries['base']['sources'].extend([
+        'base/allocator/allocator_shim.cc',
         'base/allocator/allocator_shim_default_dispatch_to_glibc.cc',
         'base/memory/shared_memory_posix.cc',
         'base/nix/xdg_util.cc',