Skip to content

Commit

Permalink
[web] Use our own icu_bidi (flutter#39200)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdebbar authored Jan 30, 2023
1 parent e67a30e commit 7cb1f0c
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions third_party/canvaskit/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if (build_canvaskit_chromium) {
extra_toolchain_args = {
skia_use_icu = false
skia_use_client_icu = true
skia_icu_bidi_third_party_dir = "//flutter/third_party/canvaskit/icu_bidi"
}
}

Expand Down
53 changes: 53 additions & 0 deletions third_party/canvaskit/icu_bidi/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

public_include_dirs = [
"//third_party/icu/source/common",
"//third_party/icu/source/i18n",
]

config("icu_bidi_public") {
include_dirs = public_include_dirs
defines = [
"U_USING_ICU_NAMESPACE=0",
"U_DISABLE_RENAMING=0",
"U_HAVE_LIB_SUFFIX=1",
"U_LIB_SUFFIX_C_NAME=_skia",
"U_DISABLE_VERSION_SUFFIX=1",
"SK_USING_THIRD_PARTY_ICU",
]
cflags = []

foreach(dir, include_dirs) {
cflags += [
"-isystem",
rebase_path(dir),
]
}
}

static_library("icu_bidi") {
defines = [
"U_COMMON_IMPLEMENTATION",
"U_STATIC_IMPLEMENTATION",
"U_I18N_IMPLEMENTATION",
]
sources = [
"//third_party/icu/source/common/cmemory.cpp",
"//third_party/icu/source/common/cstring.cpp",
"//third_party/icu/source/common/ubidi.cpp",
"//third_party/icu/source/common/ubidi_props.cpp",
"//third_party/icu/source/common/ubidiln.cpp",
"//third_party/icu/source/common/ubidiwrt.cpp",
"//third_party/icu/source/common/uchar.cpp",
"//third_party/icu/source/common/udataswp.cpp",
"//third_party/icu/source/common/uinvchar.cpp",
"//third_party/icu/source/common/ustring.cpp",
"//third_party/icu/source/common/ustrtrns.cpp",
"//third_party/icu/source/common/utf_impl.cpp",
"//third_party/icu/source/common/utrie2.cpp",
]
public_configs = [ ":icu_bidi_public" ]
cflags = [ "-w" ]
}

0 comments on commit 7cb1f0c

Please sign in to comment.