Review for 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
bengt.rutisson at oracle.com
Wed Feb 1 23:51:43 PST 2012
I have not looked closely at your changes, so don't consider this a
review. What I did do was apply your patch and try to create a Visual
Studio project with the create.bat script. That still works. Nice!
One thing I noticed is that the ProjectCreator tool generates some files
for the ADLC builds. These files still use the CPP name. Since it still
works to create a project I don't know if this needs to be changed. But
maybe it is good to be consistent.
Here's where we use the CPP name:
145: printWriter.println("# SUBTRACT CPP /YX /Yc /Yu");
149: printWriter.println("# ADD CPP
210: rv.add("ADD CPP /nologo /MT /W3 /WX /GX /YX /Fr /FD /c");
217: rv.add("ADD BASE CPP "+Util.prefixed_join(" /I ", includes,
218: rv.add("ADD CPP "+Util.prefixed_join(" /I ", includes, true));
219: rv.add("ADD BASE CPP "+Util.prefixed_join(" /D ", defines,
220: rv.add("ADD CPP "+Util.prefixed_join(" /D ", defines, true));
221: rv.add("ADD CPP /Yu\"incls/_precompiled.incl\"");
230: rv.add("ADD BASE CPP /MD");
231: rv.add("ADD CPP /MD");
252: rv.add("ADD BASE CPP /Gm /Zi /O"+opt);
272: rv.add("ADD CPP /O"+getOptFlag());
And these are the generated files:
On 2012-02-02 03:33, David Holmes wrote:
> Hi Erik,
> On 1/02/2012 7:13 PM, Erik Joelsson wrote:
>> 240 lines changed: 0 ins; 19 del; 221 mod; 6363 unchg
>> 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
> Lots of CCC to CXX too :)
> One compatibility concern: anyone currently setting CPP_FLAGS or
> LINK_FLAGS etc, externally, will need to change to the new names.
> Probably worth sending a wider email (jdk8-dev?) when this gets pushed.
> - CPP = $(CXX)
> + CXX = $(CXX)
> infinite recursion or a tautology? :)
> Not your doing but this has highlighted some strange rules eg:
> + $(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CXXFLAGS)
> C++ flags passed to C compiler?
> -# $(CC) is the c compiler (cc/gcc), $(CCC) is the c++ compiler (CC/g++).
> -C_COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS)
> -CC_COMPILE = $(CCC) $(CPPFLAGS) $(CFLAGS)
> +# $(CC) is the c compiler (cc/gcc), $(CXX) is the c++ compiler (CC/g++).
> +C_COMPILE = $(CC) $(CXXFLAGS) $(CFLAGS)
> +CC_COMPILE = $(CXX) $(CXXFLAGS) $(CFLAGS)
> The original code is confusing, given that CC is the C compiler it
> makes no sense that a C++ compile be called CC_COMPILE. Is it worth
> changing these to CC_COMPILE and CXX_COMPILE? Maybe a secondary cleanup?
> And again C++ flags passed to C compiler :(
> You missed a couple of scripts on Windows that use LINK_VER:
>> The build-infra project is starting to move into jdk8. For the hotspot
>> build to stay compatible with the changes, the naming of standard make
>> variables, like CC and LD need to be standardized across the build.
>> Currently hotspot names the C++ compiler CPP, which is traditionally the
>> name of the preprocessor. The windows nmake files name the linker LINK.
>> We would like to rename the C++ compiler to CXX and have the linker
>> named LD everywhere.
>> Patch is tested with hsx/hotspot-rt. Testing with jdk7u is in progress.
More information about the hotspot-runtime-dev