<commit_before>diff --git a/BUILD.gn b/BUILD.gn
index dcefe3706b84c1f726256a6053e60134953a014d..95000092f77c4d54801454dd0493658e1d781452 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -94,8 +94,10 @@ if (v8_enable_disassembler == "") {
   v8_enable_disassembler = is_debug && !v8_optimized_debug
 }
 
+if (!muon_build) {
 v8_generated_peephole_source = "$target_gen_dir/bytecode-peephole-table.cc"
 v8_random_seed = "<PASSWORD>"
+}
 v8_toolset_for_shell = "host"
 
 ###############################################################################
@@ -106,6 +108,14 @@ config("internal_config") {
 
   include_dirs = [ "." ]
 
+  if (muon_build) {
+    defines = [
+      "SUPPRESS_V8_SNAPSHOT",
+      "V8_SHARED",
+      "BUILDING_V8_SHARED",
+    ]
+  }
+
   if (is_component_build) {
     defines = [
       "V8_SHARED",
@@ -133,12 +143,20 @@ config("libsampler_config") {
 # This config should only be applied to code using V8 and not any V8 code
 # itself.
 config("external_config") {
+  if (muon_build) {
+    defines = [
+      "V8_SHARED",
+      "USING_V8_SHARED",
+    ]
+  }
+
   if (is_component_build) {
     defines = [
       "V8_SHARED",
       "USING_V8_SHARED",
     ]
   }
+
   include_dirs = [ "include" ]
   libs = []
   if (is_android && current_toolchain != host_toolchain) {
@@ -345,6 +363,22 @@ config("toolchain") {
   }
 }
 
+if (muon_build) {
+  group("v8") {
+    public_deps = [ "//electron/build/node:build_node" ]
+    public_configs = [ ":external_config" ]
+  }
+  group("v8_snapshot") {
+    public_deps = [ "//electron/build/node:build_node" ]
+  }
+  group("v8_libplatform") {
+    public_deps = [ "//electron/build/node:build_node" ]
+    public_configs = [ ":libplatform_config" ]
+  }
+  group("d8") {}
+  group("postmortem-metadata") {}
+  group("gn_all") {}
+} else {
 ###############################################################################
 # Actions
 #
@@ -2268,13 +2302,13 @@ v8_executable("mkpeephole") {
 ###############################################################################
 # Public targets
 #
-
+}
 want_v8_shell =
     (current_toolchain == host_toolchain && v8_toolset_for_shell == "host") ||
     (current_toolchain == v8_snapshot_toolchain &&
      v8_toolset_for_shell == "host") ||
     (current_toolchain != host_toolchain && v8_toolset_for_shell == "target")
-
+if (!muon_build) {
 group("gn_all") {
   testonly = true
 
@@ -2466,7 +2500,7 @@ v8_executable("v8_parser_shell") {
     }
   }
 }
-
+}
 if (want_v8_shell) {
   v8_executable("v8_shell") {
     sources = [
@@ -2492,7 +2526,7 @@ if (want_v8_shell) {
     }
   }
 }
-
+if (!muon_build) {
 template("v8_fuzzer") {
   name = target_name
   forward_variables_from(invoker, "*")
@@ -2581,3 +2615,4 @@ v8_source_set("wasm_asmjs_fuzzer") {
 
 v8_fuzzer("wasm_asmjs_fuzzer") {
 }
+}
diff --git a/src/snapshot/mksnapshot.cc b/src/snapshot/mksnapshot.cc
index f4362e5077e1231e2e57ccaf06ccc9769ebaae61..e048e26d768e358a9097f35afe60585de2cde50d 100644
--- a/src/snapshot/mksnapshot.cc
+++ b/src/snapshot/mksnapshot.cc
@@ -5,7 +5,7 @@
 #include <errno.h>
 #include <signal.h>
 #include <stdio.h>
-
+#ifndef SUPPRESS_V8_SNAPSHOT
 #include "include/libplatform/libplatform.h"
 #include "src/assembler.h"
 #include "src/base/platform/platform.h"
@@ -16,7 +16,6 @@
 #include "src/snapshot/startup-serializer.h"
 
 using namespace v8;
-
 class SnapshotWriter {
  public:
   SnapshotWriter() : fp_(NULL), startup_blob_file_(NULL) {}
@@ -133,9 +132,10 @@ char* GetExtraCode(char* filename, const char* description) {
   fclose(file);
   return chars;
 }
-
+#endif
 
 int main(int argc, char** argv) {
+#ifndef SUPPRESS_V8_SNAPSHOT
   // Make mksnapshot runs predictable to create reproducible snapshots.
   i::FLAG_predictable = true;
 
@@ -180,5 +180,6 @@ int main(int argc, char** argv) {
   V8::Dispose();
   V8::ShutdownPlatform();
   delete platform;
+#endif
   return 0;
 }
<commit_msg>fix linux build auditors @bbondy @posix4e<commit_after>diff --git a/BUILD.gn b/BUILD.gn
index dcefe3706b84c1f726256a6053e60134953a014d..30b337bebaaaca93b1aa04af8514c43be51e940f 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -94,8 +94,10 @@ if (v8_enable_disassembler == "") {
   v8_enable_disassembler = is_debug && !v8_optimized_debug
 }
 
+if (!muon_build) {
 v8_generated_peephole_source = "$target_gen_dir/bytecode-peephole-table.cc"
 v8_random_seed = "<PASSWORD>"
+}
 v8_toolset_for_shell = "host"
 
 ###############################################################################
@@ -106,6 +108,14 @@ config("internal_config") {
 
   include_dirs = [ "." ]
 
+  if (muon_build) {
+    defines = [
+      "SUPPRESS_V8_SNAPSHOT",
+      "V8_SHARED",
+      "BUILDING_V8_SHARED",
+    ]
+  }
+
   if (is_component_build) {
     defines = [
       "V8_SHARED",
@@ -133,12 +143,20 @@ config("libsampler_config") {
 # This config should only be applied to code using V8 and not any V8 code
 # itself.
 config("external_config") {
+  if (muon_build) {
+    defines = [
+      "V8_SHARED",
+      "USING_V8_SHARED",
+    ]
+  }
+
   if (is_component_build) {
     defines = [
       "V8_SHARED",
       "USING_V8_SHARED",
     ]
   }
+
   include_dirs = [ "include" ]
   libs = []
   if (is_android && current_toolchain != host_toolchain) {
@@ -345,6 +363,27 @@ config("toolchain") {
   }
 }
 
+if (muon_build) {
+  group("v8") {
+    public_deps = [ "//electron/build/node:build_node" ]
+    public_configs = [ ":external_config" ]
+  }
+  group("v8_snapshot") {
+    public_deps = [ "//electron/build/node:build_node" ]
+  }
+  group("v8_libplatform") {
+    public_deps = [ "//electron/build/node:build_node" ]
+    public_configs = [ ":libplatform_config" ]
+  }
+  group("d8") {}
+  group("postmortem-metadata") {}
+  group("gn_all") {}
+  group("wasm_asmjs_fuzzer") {}
+  group("parser_fuzzer") {}
+  group("json_fuzzer") {}
+  group("regexp_fuzzer") {}
+  group("wasm_fuzzer") {}
+} else {
 ###############################################################################
 # Actions
 #
@@ -2268,13 +2307,13 @@ v8_executable("mkpeephole") {
 ###############################################################################
 # Public targets
 #
-
+}
 want_v8_shell =
     (current_toolchain == host_toolchain && v8_toolset_for_shell == "host") ||
     (current_toolchain == v8_snapshot_toolchain &&
      v8_toolset_for_shell == "host") ||
     (current_toolchain != host_toolchain && v8_toolset_for_shell == "target")
-
+if (!muon_build) {
 group("gn_all") {
   testonly = true
 
@@ -2466,7 +2505,7 @@ v8_executable("v8_parser_shell") {
     }
   }
 }
-
+}
 if (want_v8_shell) {
   v8_executable("v8_shell") {
     sources = [
@@ -2492,7 +2531,7 @@ if (want_v8_shell) {
     }
   }
 }
-
+if (!muon_build) {
 template("v8_fuzzer") {
   name = target_name
   forward_variables_from(invoker, "*")
@@ -2581,3 +2620,4 @@ v8_source_set("wasm_asmjs_fuzzer") {
 
 v8_fuzzer("wasm_asmjs_fuzzer") {
 }
+}
diff --git a/src/snapshot/mksnapshot.cc b/src/snapshot/mksnapshot.cc
index f4362e5077e1231e2e57ccaf06ccc9769ebaae61..e048e26d768e358a9097f35afe60585de2cde50d 100644
--- a/src/snapshot/mksnapshot.cc
+++ b/src/snapshot/mksnapshot.cc
@@ -5,7 +5,7 @@
 #include <errno.h>
 #include <signal.h>
 #include <stdio.h>
-
+#ifndef SUPPRESS_V8_SNAPSHOT
 #include "include/libplatform/libplatform.h"
 #include "src/assembler.h"
 #include "src/base/platform/platform.h"
@@ -16,7 +16,6 @@
 #include "src/snapshot/startup-serializer.h"
 
 using namespace v8;
-
 class SnapshotWriter {
  public:
   SnapshotWriter() : fp_(NULL), startup_blob_file_(NULL) {}
@@ -133,9 +132,10 @@ char* GetExtraCode(char* filename, const char* description) {
   fclose(file);
   return chars;
 }
-
+#endif
 
 int main(int argc, char** argv) {
+#ifndef SUPPRESS_V8_SNAPSHOT
   // Make mksnapshot runs predictable to create reproducible snapshots.
   i::FLAG_predictable = true;
 
@@ -180,5 +180,6 @@ int main(int argc, char** argv) {
   V8::Dispose();
   V8::ShutdownPlatform();
   delete platform;
+#endif
   return 0;
 }

{'fraction_non_alphanumeric': 0.21750031340102796, 'fraction_numerical': 0.06531277422589946, 'mean_word_length': 4.030264817150063, 'pattern_counts': {'":': 4, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4787995', 'n_tokens_mistral': 3447, 'n_tokens_neox': 3145, 'n_words': 456}