declare_args() {
  is_debug = false
}

if (target_os == "") {
  target_os = host_os
}
if (target_cpu == "") {
  target_cpu = host_cpu
}
if (current_cpu == "") {
  current_cpu = target_cpu
}
if (current_os == "") {
  current_os = target_os
}

_compiler_default_config = [ "//build/gn:compiler_defaults" ]

# Debug/release-related defines.
if (is_debug) {
  _compiler_default_config += [ "//build/gn:debug" ]
} else {
  _compiler_default_config += [ "//build/gn:release" ]
}

set_defaults("executable") {
  configs = _compiler_default_config
  configs += [ "//build/gn:executable_ldconfig" ]
}
set_defaults("static_library") {
  configs = _compiler_default_config
}
set_defaults("shared_library") {
  configs = _compiler_default_config
}
set_defaults("source_set") {
  configs = _compiler_default_config
}

set_default_toolchain("//build/gn/toolchain:clang")
