Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ exclude = [
opt-level = 1

[features]
default = ["use_custom_libcxx"]
default = ["use_custom_libcxx", "v8_enable_i18n_support"]
use_custom_libcxx = []
v8_enable_i18n_support = []
v8_enable_pointer_compression = []

[dependencies]
Expand Down
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ fn build_v8(is_asan: bool) {
"use_custom_libcxx={}",
env::var("CARGO_FEATURE_USE_CUSTOM_LIBCXX").is_ok()
));
gn_args.push(format!(
"v8_enable_i18n_support={}",
env::var("CARGO_FEATURE_V8_ENABLE_I18N_SUPPORT").is_ok()
));
gn_args.push(format!(
"v8_enable_pointer_compression={}",
env::var("CARGO_FEATURE_V8_ENABLE_POINTER_COMPRESSION").is_ok()
Expand Down
7 changes: 6 additions & 1 deletion src/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "cppgc/platform.h"
#include "libplatform/libplatform.h"
#include "support.h"
#include "unicode/locid.h"
#include "v8-callbacks.h"
#include "v8-cppgc.h"
#include "v8-fast-api-calls.h"
Expand All @@ -23,6 +22,10 @@
#include "v8/src/flags/flags.h"
#include "v8/src/libplatform/default-platform.h"

#ifdef V8_INTL_SUPPORT
#include "unicode/locid.h"
#endif // V8_INTL_SUPPORT

using namespace support;

// TODO(bartlomieju): ideally we could ignore only some of the deprecated APIs
Expand Down Expand Up @@ -3784,6 +3787,7 @@ void v8__CompiledWasmModule__DELETE(v8::CompiledWasmModule* self) {

// icu

#ifdef V8_INTL_SUPPORT
extern "C" {

size_t icu_get_default_locale(char* output, size_t output_len) {
Expand All @@ -3802,6 +3806,7 @@ void icu_set_default_locale(const char* locale) {
}

} // extern "C"
#endif // V8_INTL_SUPPORT

// v8::PropertyDescriptor

Expand Down
Loading