diff --git a/.gn b/.gn
index e13ae6d5..332b811a 100644
--- a/.gn
+++ b/.gn
@@ -41,5 +41,5 @@ default_args = {
 # These are the list of GN files that run exec_script. This whitelist exists
 # to force additional review for new uses of exec_script, which is strongly
 # discouraged except for gypi_to_gn calls.
-exec_script_allowlist = build_dotfile_settings.exec_script_allowlist +
-                        [ "//build_overrides/build.gni" ]
+#exec_script_allowlist = build_dotfile_settings.exec_script_allowlist +
+#                        [ "//build_overrides/build.gni" ]
diff --git a/BUILD.gn b/BUILD.gn
index 905d947c..01f1f415 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -26,7 +26,7 @@ if (is_ios) {
 }
 
 # For faster Windows builds. See https://crbug.com/v8/8475.
-emit_builtins_as_inline_asm = is_win && is_clang
+emit_builtins_as_inline_asm = is_msvc && is_clang
 
 declare_args() {
   # Print to stdout on Android.
@@ -1633,12 +1633,16 @@ config("toolchain") {
     defines += [ "V8_TARGET_ARCH_IA32" ]
     if (is_win) {
       # Ensure no surprising artifacts from 80bit double math with x86.
-      cflags += [ "/arch:SSE2" ]
+      if (is_msvc) {
+        cflags += [ "/arch:SSE2" ]
+      } else {
+        cflags += [ "-msse2" ]
+      }
     }
   }
   if (v8_current_cpu == "x64") {
     defines += [ "V8_TARGET_ARCH_X64" ]
-    if (is_win) {
+    if (is_msvc) {
       # Increase the initial stack size. The default is 1MB, this is 2MB. This
       # applies only to executables and shared libraries produced by V8 since
       # ldflags are not pushed to dependants.
@@ -1670,7 +1674,7 @@ config("toolchain") {
   }
 
   if (v8_no_inline) {
-    if (is_win) {
+    if (is_msvc) {
       cflags += [ "/Ob0" ]
     } else {
       cflags += [
@@ -6858,9 +6862,9 @@ v8_component("v8_libbase") {
     defines += [ "_CRT_RAND_S" ]  # for rand_s()
 
     libs = [
-      "dbghelp.lib",
-      "winmm.lib",
-      "ws2_32.lib",
+      "dbghelp",
+      "winmm",
+      "ws2_32",
     ]
 
     if (v8_enable_etw_stack_walking) {
@@ -7089,7 +7093,7 @@ v8_source_set("v8_heap_base") {
   ]
 
   if (current_cpu == "x64") {
-    if (is_win) {
+    if (is_msvc) {
       # Prefer a masm version with unwind directives.
       sources += [ "src/heap/base/asm/x64/push_registers_masm.asm" ]
     } else {
@@ -7495,7 +7499,7 @@ if (current_toolchain == v8_snapshot_toolchain) {
   # disable it while taking a V8 snapshot.
   config("disable_icf") {
     visibility = [ ":*" ]  # Only targets in this file can depend on this.
-    if (is_win) {
+    if (is_msvc) {
       ldflags = [ "/OPT:NOICF" ]  # link.exe, but also lld-link.exe.
     } else if (is_apple && !use_lld) {
       ldflags = [ "-Wl,-no_deduplicate" ]  # ld64.
diff --git a/gni/v8.gni b/gni/v8.gni
index f13f530b..a8aa6d0b 100644
--- a/gni/v8.gni
+++ b/gni/v8.gni
@@ -333,7 +333,7 @@ if (target_cpu == "mips64el" || target_cpu == "mips64") {
   v8_add_configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
 }
 
-if (!build_with_chromium && is_clang) {
+if (!build_with_chromium && is_clang && !is_mingw) {
   v8_remove_configs += [ "//build/config/clang:find_bad_constructs" ]
 }
 
