Bug 49185 - Debug and Release builds on Windows clobber each other
Summary: Debug and Release builds on Windows clobber each other
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 51937 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-08 09:51 PST by Adam Roben (:aroben)
Modified: 2011-01-05 22:02 PST (History)
3 users (show)

See Also:


Attachments
Patch (448.38 KB, patch)
2011-01-05 14:38 PST, Steve Falkenburg
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2010-11-08 09:51:26 PST
Debug and Release builds on Windows clobber each other. This makes switching between configurations tedious (because you have to rebuild) and error-prone (because the build fails in weird ways if you forget to do a clean build).

We should change the builds not to clobber each other. One way to do this is to build into $WebKitOutputDir/$ConfigurationName instead of building straight into $WebKitOutputDir.
Comment 1 Adam Roben (:aroben) 2010-11-08 09:57:38 PST
(In reply to comment #0)
> One way to do this is to build into $WebKitOutputDir/$ConfigurationName instead of building straight into $WebKitOutputDir.

One thing that makes this tricky is that not all our .vcprojs share the same configuration names. For example, JavaScriptCoreGenerated only has a single configuration: "all".

Perhaps the output location needs to depend on the solution configuration name, not the project configuration name? I unfortunately don't see a Visual Studio macro that expands to the solution configuration name.
Comment 2 Adam Roben (:aroben) 2010-11-08 11:17:24 PST
<rdar://problem/8642380>
Comment 3 Adam Roben (:aroben) 2011-01-05 12:09:44 PST
*** Bug 51937 has been marked as a duplicate of this bug. ***
Comment 4 Steve Falkenburg 2011-01-05 14:38:37 PST
Created attachment 78047 [details]
Patch
Comment 5 Build Bot 2011-01-05 15:02:59 PST
Attachment 78047 [details] did not build on win:
Build output: http://queues.webkit.org/results/7250457
Comment 6 Adam Roben (:aroben) 2011-01-05 15:05:43 PST
> WebKit2/win/WebKit2.make:20
> -	-xcopy "$(OBJROOT)\bin\*.exe" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> -	xcopy "$(OBJROOT)\bin\*.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> -	xcopy "$(OBJROOT)\bin\*.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> -	xcopy "$(OBJROOT)\include\*" "$(DSTROOT)\AppleInternal\include\" /e/v/i/h/y	
> -	xcopy "$(OBJROOT)\lib\*" "$(DSTROOT)\AppleInternal\lib\" /e/v/i/h/y
> -	-xcopy "$(OBJROOT)\bin\WebKit2.resources\*" "$(DSTROOT)\AppleInternal\bin\WebKit2.resources" /e/v/i/h/y
> +	-xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\*.exe" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\*.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\*.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\include\*" "$(DSTROOT)\AppleInternal\include\" /e/v/i/h/y	
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\lib\*" "$(DSTROOT)\AppleInternal\lib\" /e/v/i/h/y
> +	-xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\WebKit2.resources\*" "$(DSTROOT)\AppleInternal\bin\WebKit2.resources" /e/v/i/h/y
>  	-mkdir "$(DSTROOT)\AppleInternal\Sources\WebKit2"
> -	xcopy "$(OBJROOT)\obj\WebKit\DerivedSources\*" "$(DSTROOT)\AppleInternal\Sources\WebKit2" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\obj\WebKit\DerivedSources\*" "$(DSTROOT)\AppleInternal\Sources\WebKit2" /e/v/i/h/y

Another opportunity for defining CONFIGURATIONBUILDDIR.

> WebKit2/win/WebKit2GeneratedCommon.vsprops:7
> +	InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops"

Don't you need to remove common.vsprops from WebKit2Generated.vcproj?

> WebKit/win/WebKit.vcproj/WebKit.make:18
> -	-xcopy "$(OBJROOT)\bin\*.exe" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> -	xcopy "$(OBJROOT)\bin\*.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> -	-xcopy "$(OBJROOT)\bin\*.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> -	xcopy "$(OBJROOT)\include\*" "$(DSTROOT)\AppleInternal\include\" /e/v/i/h/y	
> -	xcopy "$(OBJROOT)\lib\*" "$(DSTROOT)\AppleInternal\lib\" /e/v/i/h/y
> -	xcopy "$(OBJROOT)\bin\WebKit.resources\*" "$(DSTROOT)\AppleInternal\bin\WebKit.resources" /e/v/i/h/y
> +	-xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\*.exe" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\*.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> +	-xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\*.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\include\*" "$(DSTROOT)\AppleInternal\include\" /e/v/i/h/y	
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\lib\*" "$(DSTROOT)\AppleInternal\lib\" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\WebKit.resources\*" "$(DSTROOT)\AppleInternal\bin\WebKit.resources" /e/v/i/h/y

Another opportunity for defining CONFIGURATIONBUILDDIR.
Comment 7 Adam Roben (:aroben) 2011-01-05 15:06:02 PST
View in context: https://bugs.webkit.org/attachment.cgi?id=78047&action=review

Might want to let the EWS bot chew on this before landing.

> Source/JavaScriptCore/ChangeLog:34
> +2011-01-05  Steve Falkenburg  <sfalken@apple.com>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Debug and Release builds on Windows clobber each other
> +        https://bugs.webkit.org/show_bug.cgi?id=49185
> +
> +        * JavaScriptCore.vcproj/JavaScriptCore.make:
> +        * JavaScriptCore.vcproj/JavaScriptCore.sln:
> +        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
> +        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
> +        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
> +        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
> +        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops:
> +        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops: Added.
> +        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
> +        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
> +        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
> +        * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
> +        * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
> +        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
> +        * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
> +        * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
> +        * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
> +        * JavaScriptCore.vcproj/jsc/jsc.vcproj:
> +        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
> +        * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
> +        * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
> +        * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
> +        * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
> +        * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
> +
>  2011-01-05  Brent Fulgham  <bfulgham@webkit.org>
>  

It would be great to have some more description here, e.g., how we used to build, how we build now, the new variables, the way the PGO build works, etc. Ditto for your other ChangeLogs.

> Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.make:17
> +    xcopy "$(SRCROOT)\AppleInternal\tests\SunSpider\*" "$(OBJROOT)\$(BUILDSTYLE)\tests\SunSpider" /e/v/i/h/y
> +    cd "$(OBJROOT)\$(BUILDSTYLE)\tests\SunSpider"

I think defining a CONFIGURATIONBUILDDIR variable in this file would be nice.

> Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops:11
> +	OutputDirectory="$(WebKitOutputDir)\Release_PGO\bin"
> +	IntermediateDirectory="$(WebKitOutputDir)\Release_PGO\obj\$(ProjectName)"
> +	>
> +  <Tool
> +		Name="VCLinkerTool"
> +		ImportLibrary="$(WebKitOutputDir)\Release_PGO\lib\$(TargetName).lib"

I wonder if you can use $(ConfigurationBuildDir) here, given that you define it later on?

> Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops:16
> +  <UserMacro
> +    Name="ConfigurationBuildDir"
> +    Value="$(WebKitOutputDir)\Release_PGO"
> +  />

Maybe you can add a comment about why this is needed.

> Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:21
> -    obj_directory = os.path.join(os.environ['WEBKITOUTPUTDIR'], 'obj')
> +    obj_directory = os.path.join(os.environ['WEBKITOUTPUTDIR'], os.environ['WEBKITCONFIGURATIONNAME'], 'obj')

Can you use ConfigurationBuildDir here? I think you probably can.

> Tools/TestWebKitAPI/win/TestWebKitAPIGeneratedCommon.vsprops:6
> +	InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops"

Don't you need to remove common.vsprops from TestWebKitAPIGenerated.vcproj?

> Tools/WebKitTestRunner/win/InjectedBundleGeneratedCommon.vsprops:7
> +	InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops"

Don't you need to remove common.vsprops from InjectedBundleGenerated.vcproj?

> WebCore/WebCore.vcproj/WebCore.make:22
> -	xcopy "$(OBJROOT)\include\*" "$(DSTROOT)\AppleInternal\include\" /e/v/i/h/y	
> -	xcopy "$(OBJROOT)\lib\*" "$(DSTROOT)\AppleInternal\lib\" /e/v/i/h/y	
> -	xcopy "$(OBJROOT)\bin\WebKit.resources\*" "$(DSTROOT)\AppleInternal\bin\WebKit.resources" /e/v/i/h/y
> -	xcopy "$(OBJROOT)\obj\WebCore\scripts\*" "$(DSTROOT)\AppleInternal\tools\scripts" /e/v/i/h/y
> -	xcopy "$(OBJROOT)\bin\*.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> -	xcopy "$(OBJROOT)\bin\*.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\include\*" "$(DSTROOT)\AppleInternal\include\" /e/v/i/h/y	
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\lib\*" "$(DSTROOT)\AppleInternal\lib\" /e/v/i/h/y	
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\WebKit.resources\*" "$(DSTROOT)\AppleInternal\bin\WebKit.resources" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\obj\WebCore\scripts\*" "$(DSTROOT)\AppleInternal\tools\scripts" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\*.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\*.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
>  	-mkdir "$(DSTROOT)\AppleInternal\Sources\WebCore"
> -	xcopy "$(OBJROOT)\obj\WebCore\DerivedSources\*" "$(DSTROOT)\AppleInternal\Sources\WebCore" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\obj\WebCore\DerivedSources\*" "$(DSTROOT)\AppleInternal\Sources\WebCore" /e/v/i/h/y

This is another place where defining CONFIGURATIONBUILDDIR would be helpful.

> WebCore/WebCore.vcproj/WebCoreGeneratedCairo.vsprops:6
> +	InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops"

Don't you need to remove common.vsprops from WebCoreGenerated.vcproj?

> WebCore/WebCore.vcproj/WebCoreGeneratedCommon.vsprops:7
> +	InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops"

Ditto.

> WebKit2/win/WebKit2.make:20
> -	-xcopy "$(OBJROOT)\bin\*.exe" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> -	xcopy "$(OBJROOT)\bin\*.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> -	xcopy "$(OBJROOT)\bin\*.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> -	xcopy "$(OBJROOT)\include\*" "$(DSTROOT)\AppleInternal\include\" /e/v/i/h/y	
> -	xcopy "$(OBJROOT)\lib\*" "$(DSTROOT)\AppleInternal\lib\" /e/v/i/h/y
> -	-xcopy "$(OBJROOT)\bin\WebKit2.resources\*" "$(DSTROOT)\AppleInternal\bin\WebKit2.resources" /e/v/i/h/y
> +	-xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\*.exe" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\*.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\*.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\include\*" "$(DSTROOT)\AppleInternal\include\" /e/v/i/h/y	
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\lib\*" "$(DSTROOT)\AppleInternal\lib\" /e/v/i/h/y
> +	-xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\WebKit2.resources\*" "$(DSTROOT)\AppleInternal\bin\WebKit2.resources" /e/v/i/h/y
>  	-mkdir "$(DSTROOT)\AppleInternal\Sources\WebKit2"
> -	xcopy "$(OBJROOT)\obj\WebKit\DerivedSources\*" "$(DSTROOT)\AppleInternal\Sources\WebKit2" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\obj\WebKit\DerivedSources\*" "$(DSTROOT)\AppleInternal\Sources\WebKit2" /e/v/i/h/y

Another opportunity for defining CONFIGURATIONBUILDDIR.

> WebKit2/win/WebKit2GeneratedCommon.vsprops:7
> +	InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops"

Don't you need to remove common.vsprops from WebKit2Generated.vcproj?

> WebKit/win/WebKit.vcproj/WebKit.make:18
> -	-xcopy "$(OBJROOT)\bin\*.exe" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> -	xcopy "$(OBJROOT)\bin\*.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> -	-xcopy "$(OBJROOT)\bin\*.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> -	xcopy "$(OBJROOT)\include\*" "$(DSTROOT)\AppleInternal\include\" /e/v/i/h/y	
> -	xcopy "$(OBJROOT)\lib\*" "$(DSTROOT)\AppleInternal\lib\" /e/v/i/h/y
> -	xcopy "$(OBJROOT)\bin\WebKit.resources\*" "$(DSTROOT)\AppleInternal\bin\WebKit.resources" /e/v/i/h/y
> +	-xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\*.exe" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\*.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> +	-xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\*.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\include\*" "$(DSTROOT)\AppleInternal\include\" /e/v/i/h/y	
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\lib\*" "$(DSTROOT)\AppleInternal\lib\" /e/v/i/h/y
> +	xcopy "$(OBJROOT)\$(BUILDSTYLE)\bin\WebKit.resources\*" "$(DSTROOT)\AppleInternal\bin\WebKit.resources" /e/v/i/h/y

Another opportunity for defining CONFIGURATIONBUILDDIR.
Comment 8 Steve Falkenburg 2011-01-05 22:02:53 PST
Committed r75138: <http://trac.webkit.org/changeset/75138>