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 import("//third_party/icu/config.gni") | 5 import("//third_party/icu/config.gni") |
6 | 6 |
7 if (is_android) { | 7 if (is_android) { |
8 import("//build/config/android/rules.gni") | 8 import("//build/config/android/rules.gni") |
9 } | 9 } |
10 | 10 |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
574 if (is_ios) { | 574 if (is_ios) { |
575 bundle_data("icudata") { | 575 bundle_data("icudata") { |
576 sources = [ "common/icudtl.dat" ] | 576 sources = [ "common/icudtl.dat" ] |
577 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ] | 577 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ] |
578 } | 578 } |
579 } else { | 579 } else { |
580 copy("icudata") { | 580 copy("icudata") { |
581 if (is_android) { | 581 if (is_android) { |
582 sources = [ | 582 sources = [ |
583 "android/icudtl.dat", | 583 "android/icudtl.dat", |
584 ] | 584 ] |
Michael Achenbach
2016/07/26 09:18:56
Readability suggestion: Maybe move the case distin
jungshik at Google
2016/07/26 19:58:14
Thank you for the suggestion. I did what you propo
| |
585 } else if (current_cpu == "mips" || current_cpu == "mips64") { | |
586 sources = [ | |
587 "common/icudtb.dat", | |
588 ] | |
585 } else { | 589 } else { |
586 sources = [ | 590 sources = [ |
587 "common/icudtl.dat", | 591 "common/icudtl.dat", |
588 ] | 592 ] |
589 } | 593 } |
590 | 594 |
591 outputs = [ | 595 if (current_cpu == "mips" || current_cpu == "mips64") { |
592 "$root_out_dir/icudtl.dat", | 596 outputs = [ |
593 ] | 597 "$root_out_dir/icudtb.dat", |
594 | 598 ] |
595 data = [ | 599 data = [ |
596 "$root_out_dir/icudtl.dat", | 600 "$root_out_dir/icudtb.dat", |
597 ] | 601 ] |
602 } else { | |
603 outputs = [ | |
604 "$root_out_dir/icudtl.dat", | |
605 ] | |
606 data = [ | |
607 "$root_out_dir/icudtl.dat", | |
608 ] | |
609 } | |
598 } | 610 } |
599 } | 611 } |
600 } else { | 612 } else { |
Michael Achenbach
2016/07/26 09:29:45
Note that v8 isn't using this case anymore. I don'
jungshik at Google
2016/07/26 19:58:14
Yeah. I noticed that change made in v8 a few weeks
| |
601 if (is_win) { | 613 if (is_win) { |
602 # On Windows the target DLL is pre-built so just use a copy rule. | 614 # On Windows the target DLL is pre-built so just use a copy rule. |
603 copy("icudata") { | 615 copy("icudata") { |
604 sources = [ | 616 sources = [ |
605 "windows/icudt.dll", | 617 "windows/icudt.dll", |
606 ] | 618 ] |
607 outputs = [ | 619 outputs = [ |
608 "$root_out_dir/icudt.dll", | 620 "$root_out_dir/icudt.dll", |
609 ] | 621 ] |
610 | 622 |
611 data = [ | 623 data = [ |
612 "$root_out_dir/icudtl.dll", | 624 "$root_out_dir/icudtl.dll", |
613 ] | 625 ] |
614 } | 626 } |
615 } else { | 627 } else { |
628 data_bundle = "common/icudtl.dat" | |
629 data_assembly = "$target_gen_dir/icudtl_dat.S" | |
630 if (is_android) { | |
631 data_bundle = "android/icudtl.dat" | |
632 } | |
633 else if (current_cpu == "mips" || current_cpu == "mips64") { | |
634 data_bundle = "common/icudtb.dat" | |
635 data_assembly = "$target_gen_dir/icudtb_dat.S" | |
636 } | |
637 | |
638 action("make_data_assembly") { | |
639 script = "scripts/make_data_assembly.py" | |
640 inputs = [ data_bundle ] | |
641 outputs = [ data_assembly ] | |
642 args = [ | |
Michael Achenbach
2016/07/26 09:18:56
FYI: I assume the action is executed in the root_b
jungshik at Google
2016/07/26 19:58:14
Those values are as expected. Do you see any probl
| |
643 rebase_path(data_bundle, root_build_dir), | |
644 rebase_path(data_assembly, root_build_dir), | |
645 ] | |
646 if (is_mac) { | |
647 args += [ "--mac" ] | |
648 } | |
649 } | |
650 | |
616 source_set("icudata") { | 651 source_set("icudata") { |
617 # These are hand-generated, but will do for now. | |
618 # | |
619 # TODO(GYP): Gyp has considerations here for QNX and for the host toolchai n | 652 # TODO(GYP): Gyp has considerations here for QNX and for the host toolchai n |
620 # that have not been ported over. | 653 # that have not been ported over. |
621 if (is_linux) { | 654 sources = [ data_assembly, ] |
622 sources = [ | |
623 "linux/icudtl_dat.S", | |
624 ] | |
625 } else if (is_mac) { | |
626 sources = [ | |
627 "mac/icudtl_dat.S", | |
628 ] | |
629 } else if (is_android) { | |
630 sources = [ | |
631 "android/icudtl_dat.S", | |
632 ] | |
633 } else { | |
634 assert(false, "No icu data for this platform") | |
635 } | |
636 defines = [ "U_HIDE_DATA_SYMBOL" ] | 655 defines = [ "U_HIDE_DATA_SYMBOL" ] |
656 deps = [ ":make_data_assembly", ] | |
637 } | 657 } |
638 } | 658 } |
639 } | 659 } |
OLD | NEW |