RFR: JDK-8077824: Introduce DefineNativeToolchain to handle toolchain configurations
erik.joelsson at oracle.com
Wed Apr 15 09:24:56 UTC 2015
The macro SetupNativeCompilation handles various overrides of the
compiler and linker used for compilation. There is also a LANG option,
which implies that it needs to be told if it's compiling C or C++ when
in reality, this is handled automatically. The real purpose of the LANG
option is just to decide which executable to use for linking in certain
I would like to put some more structure around this by introducing a new
macro, DefineNativeToolchain. There s a default and a couple of others,
extending the default, for linking with the C++ compiler, building for
the build platform etc. These definitions will help ensure that all the
necessary executables and options are overridden for each of these usecases.
The implementation is in NativeCompilation.gmk. I took the liberty of
cleaning out some unused compiler/linker variables.
The jdk changes are mostly just removing "LANG:=" and replacing it when
necessary with "TOOLCHAIN:=TOOLCHAIN_LINK_CXX". Note that this is not
needed for Windows only configurations.
More information about the build-dev