WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
132619
Add Makefile targets for copying static libraries (LLVM and WKSI)
https://bugs.webkit.org/show_bug.cgi?id=132619
Summary
Add Makefile targets for copying static libraries (LLVM and WKSI)
David Kilzer (:ddkilzer)
Reported
2014-05-06 11:58:45 PDT
For developers that use "make" to build WebKit, it would be useful to have targets to copy the static libraries so that one could run: make libs debug Or even more abbreviated: make l d
Attachments
Patch v1
(3.98 KB, patch)
2014-05-06 13:13 PDT
,
David Kilzer (:ddkilzer)
no flags
Details
Formatted Diff
Diff
Patch v2
(3.66 KB, patch)
2014-05-06 13:19 PDT
,
David Kilzer (:ddkilzer)
no flags
Details
Formatted Diff
Diff
Patch v3
(3.57 KB, patch)
2014-05-06 17:22 PDT
,
David Kilzer (:ddkilzer)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Mark Rowe (bdash)
Comment 1
2014-05-06 12:41:26 PDT
Why not just include WebKitLibraries in the top level Makefile's list of projects, and give it a Makefile that does the right thing? Then the obvious "make debug" will Just Work.
David Kilzer (:ddkilzer)
Comment 2
2014-05-06 13:13:16 PDT
Created
attachment 230926
[details]
Patch v1
David Kilzer (:ddkilzer)
Comment 3
2014-05-06 13:14:49 PDT
(In reply to
comment #1
)
> Why not just include WebKitLibraries in the top level Makefile's list of projects, and give it a Makefile that does the right thing? Then the obvious "make debug" will Just Work.
I had assumed for internal developers who build WKSI that this wouldn't be desirable, but I now realize the default action for copy-webkitlibraries-to-product-directory is not to overwrite newer copies of WKSI (and LLVM) static libraries, so this would be fine. New patch forthcoming.
David Kilzer (:ddkilzer)
Comment 4
2014-05-06 13:19:20 PDT
Created
attachment 230927
[details]
Patch v2
Mark Rowe (bdash)
Comment 5
2014-05-06 13:22:21 PDT
Comment on
attachment 230927
[details]
Patch v2 View in context:
https://bugs.webkit.org/attachment.cgi?id=230927&action=review
> WebKitLibraries/Makefile:10 > +libs l: > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --wksi --llvm > + > +llvm: > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --llvm > + > +wksi: > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --wksi
The llvm, wksi and l targets seem unnecessary. How does copy-webkitlibraries-to-product-directory know which configuration's build directory to copy to?
David Kilzer (:ddkilzer)
Comment 6
2014-05-06 13:46:21 PDT
(In reply to
comment #5
)
> (From update of
attachment 230927
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=230927&action=review
> > > WebKitLibraries/Makefile:10 > > +libs l: > > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --wksi --llvm > > + > > +llvm: > > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --llvm > > + > > +wksi: > > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --wksi > > The llvm, wksi and l targets seem unnecessary.
The are convenience targets in case someone wants to "build" only one or the other (instead of typing out the whole command).
> How does copy-webkitlibraries-to-product-directory know which configuration's build directory to copy to?
It ends up calling productDir() in webkitdirs.pm, which uses the current set-webkit-configuration (which is set by Makefile.shared, which WebKitLibraries/Makefile includes) because we don't pass a product directory on the command line, and we don't set BUILT_PRODUCTS_DIR in the environment when the script is run. In other words, the fallback for the product directory in copy-webkitlibraries-to-product-directory is the following: 1. command-line argument, else 2. $ENV{BUILT_PRODUCTS_DIR}, else 3. productDir() in webkitdirs.pm.
David Kilzer (:ddkilzer)
Comment 7
2014-05-06 13:47:11 PDT
(In reply to
comment #6
)
> (In reply to
comment #5
) > > The llvm, wksi and l targets seem unnecessary. > > The are convenience targets in case someone wants to "build" only one or the other (instead of typing out the whole command).
I'm okay removing these as well.
Mark Rowe (bdash)
Comment 8
2014-05-06 13:58:37 PDT
(In reply to
comment #6
)
> (In reply to
comment #5
) > > (From update of
attachment 230927
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=230927&action=review
> > > > > WebKitLibraries/Makefile:10 > > > +libs l: > > > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --wksi --llvm > > > + > > > +llvm: > > > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --llvm > > > + > > > +wksi: > > > + perl $(SCRIPTS_PATH)/copy-webkitlibraries-to-product-directory --wksi > > > > The llvm, wksi and l targets seem unnecessary. > > The are convenience targets in case someone wants to "build" only one or the other (instead of typing out the whole command). > > > How does copy-webkitlibraries-to-product-directory know which configuration's build directory to copy to? > > It ends up calling productDir() in webkitdirs.pm, which uses the current set-webkit-configuration (which is set by Makefile.shared, which WebKitLibraries/Makefile includes) because we don't pass a product directory on the command line, and we don't set BUILT_PRODUCTS_DIR in the environment when the script is run. > > In other words, the fallback for the product directory in copy-webkitlibraries-to-product-directory is the following: > > 1. command-line argument, else > 2. $ENV{BUILT_PRODUCTS_DIR}, else > 3. productDir() in webkitdirs.pm.
Consider the following sequence of events: 1) set-webkit-configuration --release 2) make -C WebKitLibraries debug Based on your WebKitLibraries/Makefile, I expect this will copy the libraries in to the Release configuration's build directory rather than Debug's like the command implies. I think you'll also see warnings like so: Makefile:4: warning: overriding commands for target `debug' ../Makefile.shared:32: warning: ignoring old commands for target `debug'
David Kilzer (:ddkilzer)
Comment 9
2014-05-06 17:22:58 PDT
Created
attachment 230956
[details]
Patch v3
WebKit Commit Bot
Comment 10
2014-05-06 22:18:36 PDT
Comment on
attachment 230956
[details]
Patch v3 Clearing flags on attachment: 230956 Committed
r168410
: <
http://trac.webkit.org/changeset/168410
>
WebKit Commit Bot
Comment 11
2014-05-06 22:18:40 PDT
All reviewed patches have been landed. Closing bug.
Blaze Burg
Comment 12
2015-09-08 09:30:05 PDT
***
Bug 129499
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug