diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn index 3df1b355b56f91..d39f978a58f1e6 100644 --- a/build/config/win/BUILD.gn +++ b/build/config/win/BUILD.gn @@ -131,7 +131,9 @@ config("compiler") { # microarchitecture. MSVC only supports a subset of architectures, and the # next step after SSE2 will be AVX. if (current_cpu == "x86" || current_cpu == "x64") { - cflags += [ "-msse3" ] + if (target_cpu == "x64") { + cflags += [ "-msse3" ] + } } # Enable ANSI escape codes if something emulating them is around (cmd.exe diff --git a/chrome/chrome_elf/hook_util/hook_util.cc b/chrome/chrome_elf/hook_util/hook_util.cc index 207f93c1fd6faf..4ed7bb1b67d547 100644 --- a/chrome/chrome_elf/hook_util/hook_util.cc +++ b/chrome/chrome_elf/hook_util/hook_util.cc @@ -10,7 +10,6 @@ #include "chrome/chrome_elf/nt_registry/nt_registry.h" // utils #include "sandbox/win/src/interception_internal.h" #include "sandbox/win/src/internal_types.h" -#include "sandbox/win/src/sandbox_utils.h" #include "sandbox/win/src/service_resolver.h" namespace { @@ -218,7 +217,8 @@ sandbox::ServiceResolverThunk* HookSystemService(bool relaxed) { // handling one like it does in 32-bit versions). thunk = new sandbox::ServiceResolverThunk(current_process, relaxed); #else - if (nt::IsCurrentProcWow64()) { + BOOL is_wow64 = FALSE; + if (::IsWow64Process(::GetCurrentProcess(), &is_wow64) && is_wow64) { if (::IsWindows10OrGreater()) thunk = new sandbox::Wow64W10ResolverThunk(current_process, relaxed); else if (::IsWindows8OrGreater())