Closed Bug 1221819 Opened 9 years ago Closed 9 years ago

Move the NSS C++/gtest build boilerplate somewhere common

Categories

(NSS :: Build, defect)

defect
Not set
normal

Tracking

(firefox45 affected)

RESOLVED FIXED
Tracking Status
firefox45 --- affected

People

(Reporter: jld, Assigned: mt)

References

Details

Attachments

(1 file)

Right now there's code at the bottom of external_tests/{google_test,ssl_gtest}/Makefile to deal with issues specific to C++ or to the set of C++ features used by gtest (e.g., enabling EH on Windows); it's partially duplicated between those files, and some of it (changing MKPROG/MKSHLIB to commands that can link C++) seems as if it belongs in coreconf. Future test work, like bug 554827, will probably give us more duplication.
Attached patch bug1221819.patchSplinter Review
I have only tested this on my mac, but I will test elsewhere too.
Attachment #8689638 - Flags: review?(jld)
Comment on attachment 8689638 [details] [diff] [review] bug1221819.patch Review of attachment 8689638 [details] [diff] [review]: ----------------------------------------------------------------- Sorry for the delay. Seems reasonable, with one comment: ::: external_tests/common/gtest.mk @@ +3,5 @@ > +# This Source Code Form is subject to the terms of the Mozilla Public > +# License, v. 2.0. If a copy of the MPL was not distributed with this > +# file, You can obtain one at http://mozilla.org/MPL/2.0/. > + > +include ../../cmd/platlibs.mk Is it safe to include this for the gtest library, even though it's normally for executables?
Attachment #8689638 - Flags: review?(jld) → review+
gtests are built as executables. There's probably a better way to do this, we certainly don't depend on the system libraries, but this works well enough. We'll probably switch to static linkage at some point soon, so that we can access private functions. But I'll leave that to ekr, who is the one doing that work.
Assignee: nobody → martin.thomson
external_tests/google_test builds a library; external_tests/{pk11,ssl}_gtest build executables.
Hmm, good point. Adding platlibs.mk changes the linker line for the library. On the mac, this doesn't affect the result in any way that I can detect... probably just because gtests don't actually need NSS symbols.... but it's not great.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.22
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: