Skip to content

Commit

Permalink
Fix macos build
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwang committed Feb 7, 2023
1 parent 23998b3 commit 84ff9fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion chrome/BUILD.gn
Expand Up @@ -1172,6 +1172,7 @@ if (is_win || (is_linux && !is_component_build)) {
"//headless:headless_shell_lib",
#"//third_party/cld_3/src/src:cld_3",
"//ui/events:dom_keycode_converter",
"//tools/v8_context_snapshot:buildflags",
]

if (is_component_build) {
Expand All @@ -1185,7 +1186,7 @@ if (is_win || (is_linux && !is_component_build)) {
]

configs += [ "//build/config/compiler:wexit_time_destructors" ]
configs += [ "//tools/v8_context_snapshot:use_v8_context_snapshot" ]
configs += [ "//v8:external_startup_data" ]
}

mac_framework_bundle("chrome_framework") {
Expand Down
4 changes: 2 additions & 2 deletions chrome/app/chrome_main_delegate.cc
Expand Up @@ -7,6 +7,7 @@

#include "chrome/chrome_elf/chrome_elf_main.h"
#include "base/files/file_util.h"
#include "tools/v8_context_snapshot/buildflags.h"

#include <stddef.h>

Expand Down Expand Up @@ -1133,8 +1134,7 @@ absl::optional<int> ChromeMainDelegate::BasicStartupComplete() {
base::NativeLibraryLoadError error;
#if defined(OS_MAC)
base::FilePath node_dll_path = base::mac::FrameworkBundlePath().Append(base::FilePath::FromUTF8Unsafe(base::GetNativeLibraryName("node")));
base::ScopedCFTypeRef<CFStringRef> natives_file_name(base::SysUTF8ToCFStringRef(V8_CONTEXT_SNAPSHOT_FILENAME));
std::string blob_path = base::mac::PathForFrameworkBundleResource(natives_file_name).AsUTF8Unsafe();
std::string blob_path = base::mac::PathForFrameworkBundleResource(BUILDFLAG(V8_CONTEXT_SNAPSHOT_FILENAME)).AsUTF8Unsafe();
#else
base::FilePath node_dll_path = base::FilePath::FromUTF8Unsafe(base::GetNativeLibraryName("node"));
#endif
Expand Down

0 comments on commit 84ff9fa

Please sign in to comment.