| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 declare_args() { |
| 6 # Tells icu to load an external data file rather than rely on the icudata |
| 7 # being linked directly into the binary. |
| 8 icu_use_data_file = false |
| 9 } |
| 10 |
| 5 # Meta target that includes both icuuc and icui18n. Most targets want both. | 11 # Meta target that includes both icuuc and icui18n. Most targets want both. |
| 6 # You can depend on the individually if you need to. | 12 # You can depend on the individually if you need to. |
| 7 group("icu") { | 13 group("icu") { |
| 8 deps = [ | 14 deps = [ |
| 9 ":icui18n", | 15 ":icui18n", |
| 10 ":icuuc", | 16 ":icuuc", |
| 11 ] | 17 ] |
| 12 } | 18 } |
| 13 | 19 |
| 14 # Shared config used by ICU and all dependents. | 20 # Shared config used by ICU and all dependents. |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 "source/common/utrace.c", | 393 "source/common/utrace.c", |
| 388 "source/common/utrie.c", | 394 "source/common/utrie.c", |
| 389 "source/common/utrie2.cpp", | 395 "source/common/utrie2.cpp", |
| 390 "source/common/utrie2_builder.c", | 396 "source/common/utrie2_builder.c", |
| 391 "source/common/uts46.cpp", | 397 "source/common/uts46.cpp", |
| 392 "source/common/utypes.c", | 398 "source/common/utypes.c", |
| 393 "source/common/uvector.cpp", | 399 "source/common/uvector.cpp", |
| 394 "source/common/uvectr32.cpp", | 400 "source/common/uvectr32.cpp", |
| 395 "source/common/uvectr64.cpp", | 401 "source/common/uvectr64.cpp", |
| 396 "source/common/wintz.c", | 402 "source/common/wintz.c", |
| 397 "source/stubdata/stubdata.c", | |
| 398 ] | 403 ] |
| 399 defines = [ | 404 defines = [ |
| 400 "U_COMMON_IMPLEMENTATION", | 405 "U_COMMON_IMPLEMENTATION", |
| 401 ] | 406 ] |
| 402 deps = [ | 407 deps = [ |
| 403 ":icudata", | 408 ":icudata", |
| 404 ] | 409 ] |
| 405 configs += [ ":icu_code" ] | 410 configs += [ ":icu_code" ] |
| 406 | 411 |
| 407 configs -= [ | 412 configs -= [ |
| 408 "//build/config/compiler:no_rtti", # ICU uses RTTI. | 413 "//build/config/compiler:no_rtti", # ICU uses RTTI. |
| 409 "//build/config/compiler:chromium_code", | 414 "//build/config/compiler:chromium_code", |
| 410 ] | 415 ] |
| 411 configs += [ | 416 configs += [ |
| 412 "//build/config/compiler:rtti", | 417 "//build/config/compiler:rtti", |
| 413 "//build/config/compiler:no_chromium_code", | 418 "//build/config/compiler:no_chromium_code", |
| 414 ] | 419 ] |
| 415 | 420 |
| 416 direct_dependent_configs = [ ":icu_config" ] | 421 direct_dependent_configs = [ ":icu_config" ] |
| 417 | 422 |
| 418 if (!is_win) { | 423 if (is_win || icu_use_data_file) { |
| 419 sources -= [ "source/stubdata/stubdata.c" ] | 424 sources += [ "source/stubdata/stubdata.c" ] |
| 420 } | 425 } |
| 421 } | 426 } |
| 422 | 427 |
| 423 if (is_win) { | 428 # TODO(GYP) support use_system_icu. |
| 424 # On Windows the target DLL is pre-built so just use a copy rule. | 429 if (icu_use_data_file) { |
| 425 copy("icudata") { | 430 if (is_ios) { |
| 426 sources = [ "windows/icudt.dll" ] | 431 # TODO(GYP): Support mac resource bundle shown below. |
| 427 outputs = [ "$root_out_dir/icudt.dll" ] | 432 # 'link_settings': { |
| 433 # 'mac_bundle_resources': [ |
| 434 # 'source/data/in/icudtl.dat', |
| 435 # ], |
| 436 # } |
| 437 } else { |
| 438 copy("icudata") { |
| 439 if (is_android) { |
| 440 sources = [ "android/icudt.dat" ] |
| 441 } else { |
| 442 sources = [ "source/data/in/icudtl.dat" ] |
| 443 } |
| 444 |
| 445 outputs = [ "$root_out_dir/icudtl.dat" ] |
| 446 } |
| 428 } | 447 } |
| 429 } else { | 448 } else { |
| 430 source_set("icudata") { | 449 if (is_win) { |
| 431 sources = [ | 450 # On Windows the target DLL is pre-built so just use a copy rule. |
| 451 copy("icudata") { |
| 452 sources = [ "windows/icudt.dll" ] |
| 453 outputs = [ "$root_out_dir/icudt.dll" ] |
| 454 } |
| 455 } else { |
| 456 source_set("icudata") { |
| 432 # These are hand-generated, but will do for now. The linux version is an | 457 # These are hand-generated, but will do for now. The linux version is an |
| 433 # identical copy of the (mac) icudt46l_dat.S file, modulo removal of the | 458 # identical copy of the (mac) icudt46l_dat.S file, modulo removal of the |
| 434 # .private_extern and .const directives and with no leading underscore on | 459 # .private_extern and .const directives and with no leading underscore on |
| 435 # the icudt46_dat symbol. | 460 # the icudt46_dat symbol. |
| 436 "android/icudt46l_dat.S", | 461 # |
| 437 "linux/icudt46l_dat.S", | 462 # TODO(GYP): Gyp has considerations here for QNX and for the host toolchai
n |
| 438 "mac/icudt46l_dat.S", | 463 # that have not been ported over. |
| 439 ] | 464 if (is_linux) { |
| 440 defines = [ "U_HIDE_DATA_SYMBOL" ] | 465 sources = [ "linux/icudt46l_dat.S" ] |
| 441 | 466 } else if (is_mac) { |
| 442 # TODO(brettw) support use_system_icu and icu_use_data_file_flag. | 467 sources = [ "mac/icudt46l_dat.S" ] |
| 468 } else if (is_android) { |
| 469 sources = [ "android/icudt46l_dat.S" ] |
| 470 } else { |
| 471 assert(false, "No icu data for this platform") |
| 472 } |
| 473 defines = [ "U_HIDE_DATA_SYMBOL" ] |
| 474 } |
| 443 } | 475 } |
| 444 } | 476 } |
| OLD | NEW |