Skip to content
Permalink
Browse files

build: select default toolchain

(Patch used from openSUSE.)

Starting with this commit, you will need to use:

	export CC=gcc CXX=g++
	(or clang equivalents)

(Otherwise, `gn bootstrap` and `ninja` will fail with spurious errors
such as:)

	-MD: no such file or directory

If anyone knows whether gn can do

	= getenv("CC") || "gcc"

that would be magnificient.
  • Loading branch information
jengelh committed Apr 20, 2017
1 parent 0c847d1 commit a3ccfda7406f8e6ac25211893c37aa463cb451c7
Showing with 19 additions and 0 deletions.
  1. +19 −0 toolchain/BUILD.gn
@@ -0,0 +1,19 @@
import("//build/toolchain/gcc_toolchain.gni")

gcc_toolchain("default") {
cc = getenv("CC")
cxx = getenv("CXX")
ar = "ar"
nm = "nm"
ld = cxx

extra_cflags = getenv("CFLAGS")
extra_cppflags = getenv("CPPFLAGS")
extra_cxxflags = getenv("CXXFLAGS")
extra_ldflags = getenv("LDFLAGS")

toolchain_args = {
current_cpu = current_cpu
current_os = current_os
}
}

0 comments on commit a3ccfda

Please sign in to comment.
You can’t perform that action at this time.