skia2/gn/toolchain
Mike Klein 0266c8a4e6 allow overriding {target,host}_link = ... in GN
This lets it be something other than cxx,
e.g. to compile with Goma but to link with the NDK locally,

    declare_args() {
      home = getenv("HOME")
      use_goma = true
      _target = "aarch64-linux-android21"
    }
    ndk = "$home/ndk"

    extra_asmflags = []
    extra_cflags = []
    extra_ldflags = []

    if (use_goma) {
      cc = "$home/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang"
      cxx = "$home/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++"
      cc_wrapper = "$home/depot_tools/.cipd_bin/gomacc"

      target_cc = cc
      target_cxx = cxx
      target_link = "$ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=$_target"

      extra_asmflags += [ "--target=$_target" ]
      extra_cflags += [ "--target=$_target" ]
    } else {
      cc_wrapper = "ccache"
    }

    is_debug = true
    if (is_debug) {
      extra_cflags += [ "-Os" ]
    }

Change-Id: I17b9c3f72bc308e40c1565536d04d0673efd4ef1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332616
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-11-05 19:40:47 +00:00
..
BUILD.gn allow overriding {target,host}_link = ... in GN 2020-11-05 19:40:47 +00:00
num_cpus.py Python3 tweaks 2019-12-17 17:12:03 +00:00