WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
90973
[CMake] Make gtest a shared library
https://bugs.webkit.org/show_bug.cgi?id=90973
Summary
[CMake] Make gtest a shared library
Thiago Marcos P. Santos
Reported
2012-07-11 04:45:34 PDT
It's nicer to make it a shared library because it might improve linking time and we don't need to force gtest users to link with gtest dependencies.
Attachments
Patch
(5.54 KB, patch)
2012-07-11 04:51 PDT
,
Thiago Marcos P. Santos
no flags
Details
Formatted Diff
Diff
Patch
(5.42 KB, patch)
2012-07-12 15:02 PDT
,
Thiago Marcos P. Santos
no flags
Details
Formatted Diff
Diff
Patch
(5.46 KB, patch)
2012-07-16 05:05 PDT
,
Thiago Marcos P. Santos
no flags
Details
Formatted Diff
Diff
Patch
(6.00 KB, patch)
2012-07-16 07:39 PDT
,
Thiago Marcos P. Santos
no flags
Details
Formatted Diff
Diff
Patch
(6.28 KB, patch)
2012-07-16 07:58 PDT
,
Thiago Marcos P. Santos
no flags
Details
Formatted Diff
Diff
Patch
(6.33 KB, patch)
2012-07-16 09:53 PDT
,
Thiago Marcos P. Santos
no flags
Details
Formatted Diff
Diff
Patch
(6.37 KB, patch)
2012-07-18 02:35 PDT
,
Thiago Marcos P. Santos
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Thiago Marcos P. Santos
Comment 1
2012-07-11 04:51:43 PDT
Created
attachment 151680
[details]
Patch
Raphael Kubo da Costa (:rakuco)
Comment 2
2012-07-12 13:18:00 PDT
Comment on
attachment 151680
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=151680&action=review
I wonder if this is really needed -- gtest is only needed by unit tests, whose linking time isn't very important, and pthreads would need to be present anyway for gtest to be built.
> Source/cmake/gtest/CMakeLists.txt:26 > +IF(CMAKE_USE_PTHREADS_INIT)
You need FIND_PACKAGE(Threads) to use this. Plus, shouldn't you just always link to the thread library?
Thiago Marcos P. Santos
Comment 3
2012-07-12 14:27:35 PDT
Comment on
attachment 151680
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=151680&action=review
>> Source/cmake/gtest/CMakeLists.txt:26 >> +IF(CMAKE_USE_PTHREADS_INIT) > > You need FIND_PACKAGE(Threads) to use this. Plus, shouldn't you just always link to the thread library?
FIND_PACKAGE(Threads) is done at Options${Platform} like the other FIND_PACKAGEs. pthreads won't happen if you are building on Windows, remember that we are not the only customers of CMake build system and I want to make this reusable.
Raphael Kubo da Costa (:rakuco)
Comment 4
2012-07-12 14:38:08 PDT
Comment on
attachment 151680
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=151680&action=review
>>> Source/cmake/gtest/CMakeLists.txt:26 >>> +IF(CMAKE_USE_PTHREADS_INIT) >> >> You need FIND_PACKAGE(Threads) to use this. Plus, shouldn't you just always link to the thread library? > > FIND_PACKAGE(Threads) is done at Options${Platform} like the other FIND_PACKAGEs. > > pthreads won't happen if you are building on Windows, remember that we are not the only customers of CMake build system and I want to make this reusable.
Hmm, but don't you need to link to the equivalent thread library in other systems as well?
Thiago Marcos P. Santos
Comment 5
2012-07-12 15:02:11 PDT
Created
attachment 152071
[details]
Patch Rebased.
Thiago Marcos P. Santos
Comment 6
2012-07-12 15:13:03 PDT
(In reply to
comment #4
)
> (From update of
attachment 151680
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=151680&action=review
> > >>> Source/cmake/gtest/CMakeLists.txt:26 > >>> +IF(CMAKE_USE_PTHREADS_INIT) > >> > >> You need FIND_PACKAGE(Threads) to use this. Plus, shouldn't you just always link to the thread library? > > > > FIND_PACKAGE(Threads) is done at Options${Platform} like the other FIND_PACKAGEs. > > > > pthreads won't happen if you are building on Windows, remember that we are not the only customers of CMake build system and I want to make this reusable. > > Hmm, but don't you need to link to the equivalent thread library in other systems as well?
I don't think threading support is mandatory, but don't expect for example that thread-safe death tests will be available in this case.
Gyuyoung Kim
Comment 7
2012-07-12 15:47:08 PDT
Comment on
attachment 152071
[details]
Patch
Attachment 152071
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/13180986
Thiago Marcos P. Santos
Comment 8
2012-07-16 05:05:19 PDT
Created
attachment 152512
[details]
Patch
Gyuyoung Kim
Comment 9
2012-07-16 05:38:50 PDT
Comment on
attachment 152512
[details]
Patch
Attachment 152512
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/13253265
Thiago Marcos P. Santos
Comment 10
2012-07-16 06:15:33 PDT
(In reply to
comment #9
)
> (From update of
attachment 152512
[details]
) >
Attachment 152512
[details]
did not pass efl-ews (efl): > Output:
http://queues.webkit.org/results/13253265
[ 90%] /usr/bin/ld: ../../bin/test_ewk_view: hidden symbol `Building CXX object Source/WebKit2/CMakeFiles/ewebkit2.dir/UIProcess/WebGrammarDetail.cpp.o WTF::fastMalloc(unsigned long)' in ../../lib/libwtf_efl.a(FastMalloc.cpp.o) is referenced by DSO /usr/bin/ld: final link failed: Bad value Weird, I don't get this error locally.
Thiago Marcos P. Santos
Comment 11
2012-07-16 07:39:14 PDT
Created
attachment 152532
[details]
Patch
Gyuyoung Kim
Comment 12
2012-07-16 07:52:00 PDT
Comment on
attachment 152532
[details]
Patch
Attachment 152532
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/13242970
Thiago Marcos P. Santos
Comment 13
2012-07-16 07:58:48 PDT
Created
attachment 152535
[details]
Patch One more attempt to make EFL EWS happy. I really could not reproduce this linking error. :(
Gyuyoung Kim
Comment 14
2012-07-16 08:32:23 PDT
Comment on
attachment 152535
[details]
Patch
Attachment 152535
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/13243988
Thiago Marcos P. Santos
Comment 15
2012-07-16 09:53:21 PDT
Created
attachment 152555
[details]
Patch One more attempt.
Thiago Marcos P. Santos
Comment 16
2012-07-16 11:17:05 PDT
(In reply to
comment #15
)
> Created an attachment (id=152555) [details] > Patch > > One more attempt.
EWS is sane. Don't know why I was not having this linking errors on my desktop. The problem was gtest has now to link with WTF, since it uses it wrappers for memory allocation.
Daniel Bates
Comment 17
2012-07-17 17:02:22 PDT
Comment on
attachment 152555
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=152555&action=review
r=me
> ChangeLog:10 > + dependencies like pthreads (and avoid linking errors when it is not
Nit: "and avoid" => "which produces" OR "which causes"
Thiago Marcos P. Santos
Comment 18
2012-07-18 02:35:44 PDT
Created
attachment 152970
[details]
Patch Updated patch. Thanks for reviewing.
WebKit Review Bot
Comment 19
2012-07-18 04:15:53 PDT
Comment on
attachment 152970
[details]
Patch Clearing flags on attachment: 152970 Committed
r122943
: <
http://trac.webkit.org/changeset/122943
>
WebKit Review Bot
Comment 20
2012-07-18 04:15:59 PDT
All reviewed patches have been landed. Closing 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