kind of build and how to detect? (original) (raw)

David Holmes david.holmes at oracle.com
Fri Feb 15 10:37:07 UTC 2013


On 15/02/2013 6:24 PM, Mani Sarkar wrote:

Hi David,

Thanks for coming back with a response. My apologies for not being very clear on what I'm trying to achieve here. Basically my goal is to be able to populate an environment variable in any OS say in linux, that gives me the location of the any artefact under the build folder. For our case I'll select Hotspot, which would look like the below: export HOTSPOTBINARYLOC=$TLFORESTFOLDER/build/$OPENJDKRELEASENAME/hotspot/$OSPLATFORMCOMPILERFOLDER/$BUILDTYPE As you can see we have a number of variables here, I have the value of the first one, i.e. $TLFORESTFOLDER, how do I determine the values for the four other parts of the path $OPENJDKRELEASENAME $OSPLATFORMCOMPILERFOLDER $BUILDTYPE In my case a typical build path looks like /home/openjdk/sources/jdk8tl/build/linux-x8664-normal-server-release/hotspot/linuxamd64compiler2/product/ So I have three variables which I would like to determine after running configure but before building any project using the make command. Does this make it any clearer? Basically I wish to access the environment variables you create (if it works that way) after the configure command.

The configure command doesn't create environment variables it sets make variables (into spec.gmk and hotspot-spec.gmk, and the path you list consists of pieces that come from many different places:

$OPENJDK_RELEASE_NAME

Simplest thing is for you to define this by naming the configuration or running configure from that directory.

$OS_PLATFORM_COMPILER_FOLDER

You would have to create this the same was as hotspot by building it up from OS, architecture and whether doing client/server/minimal VM build. This is non-trivial in general but maybe easier depending on your platform. The VM part is hard because depending on the make target invoked, or the value of JVM_VARIANTS, different VMs will be built. But as you will have used --with-jvm-variants as a configure arg you should know what to look for: client=compiler1, server=compiler2 etc

$BUILD_TYPE

Partially inferrable from --with-debug-level=XXX:

but I don't think the other variants are exposed at the configure level.

HTH

David

Thanks.

Cheers, Mani On Fri, Feb 15, 2013 at 7:06 AM, David Holmes <david.holmes at oracle.com_ _<mailto:david.holmes at oracle.com>> wrote: On 15/02/2013 10:55 AM, Mani Sarkar wrote: Hi all again, I did some searching in the OpenJDK folders and found the below notations: $(CONFNAME) in the below line in one of the make files: @$(PRINTF) "Building (PRODUCTNAME)fortarget′(PRODUCTNAME) for target '(PRODUCTNAME)fortarget′(call GetRealTarget)' in configuration '$(CONFNAME)'\n\n"

You can name a configuration anything you want. There is a configure option for it --with-conf-name And the below from another one: _$(OSNAME)$(BUILDARCH)_compiler2_ _$(OUTPUTDIR)/$(VMPLATFORM)_compiler2_ How could we parse these outside the make file to get some value that I could use (provided we have run configure). Do these flags expect other flags to be set before they can be parsed? I'm not quite sure what you are asking. David Thanks. Cheers, mani On Thu, Feb 14, 2013 at 7:09 PM, Mani Sarkar <sadhak001 at gmail.com <mailto:sadhak001 at gmail.com>> wrote: Hi, I had asked a query [1] long ago in line with the different builds types when build the OpenJDK project or sub-projects. I have another query related to it - i.e. is there a way to determine what type of build you are currently configured for? Is there an OS environment variable that contains one of the following after we run configure: debug fastdebug generated jvmg optimized product profiles My other query with regards to the folder '* _linux-x8664-normal-server-release*/' under the main /build folder. The naming is OS, CPU and other factors dependant, is there a way to determine through an OS environment variable or through calling a script what name the folder would get when a build was successful? Any suggestions leading to answers to the above would be highly appreciated. Thanks. Cheers mani [1] http://www.mail-archive.com/_build-dev@openjdk.java.net/_msg07325.html <http://www.mail-archive.com/build-dev@openjdk.java.net/msg07325.html> -- Twitter: @theNeomatrix369 Blog: http://neomatrix369.wordpress._com <http://neomatrix369.wordpress.com> JUG activity: LJC Advocate Meet-a-Project: https://github.com/_MutabilityDetector <https://github.com/MutabilityDetector> Come to Devoxx UK 2013: http://www.devoxx.com/display/_UK13/Home <http://www.devoxx.com/display/UK13/Home> *Don't chase success, rather aim for "Excellence", and success will come chasing after you!*

-- Twitter: @theNeomatrix369 Blog: http://neomatrix369.wordpress.com JUG activity: LJC Advocate Meet-a-Project: https://github.com/MutabilityDetector Come to Devoxx UK 2013: http://www.devoxx.com/display/UK13/Home */Don't chase success, rather aim for "Excellence", and success will come chasing after you!/*



More information about the build-dev mailing list