Skip to content
Snippets Groups Projects
BUILD.gn 33.2 KiB
Newer Older
      sources = [ "$data_dir/$data_bundle" ]
      outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
  } else {
    copy("icudata") {
      sources = [ "$data_dir/$data_bundle" ]
      outputs = [ "$root_out_dir/$data_bundle" ]
      data = [ "$root_out_dir/$data_bundle" ]
    }
  }
} else {
  if (is_win) {
    # On Windows the target DLL is pre-built so just use a copy rule.
    # data_bundle and data_dir have to be used to avoid 'unused variable'
    # error.
    data_bundle = "icudt.dll"
    data_dir = "windows"
    copy("icudata") {
      sources = [ "$data_dir/$data_bundle" ]
      outputs = [ "$root_out_dir/$data_bundle" ]
      data = outputs
    data_assembly = "$target_gen_dir/${data_bundle_prefix}_dat.S"
    action("make_data_assembly") {
      script = "scripts/make_data_assembly.py"
      inputs = [ "$data_dir/$data_bundle" ]
      outputs = [ "$data_assembly" ]
      args = [
        rebase_path(inputs[0], root_build_dir),
        rebase_path(data_assembly, root_build_dir),
      ]
      # TODO(GYP): Gyp has considerations here for QNX and for the host
      # toolchain that have not been ported over.
      if (is_mac || is_ios) {
        args += [ "--mac" ]
    }

    source_set("icudata") {
      sources = [ "$data_assembly" ]
      defines = [ "U_HIDE_DATA_SYMBOL" ]
      deps = [ ":make_data_assembly", ]