--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAJTZ7LK4qkYhTUyjCMZd2bh9poxmAVzf27rxr9SwE8%3DKwFJXqQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAMGbLiFRb_u%2Bc2eFaqz1H3%2BBEwSneAU8fZkHQ1PLg5jkrAG1iw%40mail.gmail.com.
I just realized that this won't help you with test-only code that's e.g. in a static_library() instead of a test() :-/
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAMGbLiFRb_u%2Bc2eFaqz1H3%2BBEwSneAU8fZkHQ1PLg5jkrAG1iw%40mail.gmail.com.
On Fri, Jan 12, 2018 at 4:03 PM Nico Weber <tha...@chromium.org> wrote:I just realized that this won't help you with test-only code that's e.g. in a static_library() instead of a test() :-/Even in that case, wouldn't such a static_library be marked with testonly=true? What are the cases where we have a test-only translation unit in a non testonly target? I'd be surprised if we had gtest fixtures (I think we are secretly talking about those, which need static initializers) linked in production code.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CA%2ByH71cvnQeDnquXpCJggytQ54kaaagmjVkLrZy1RqcSnBMguQ%40mail.gmail.com.
On Fri, Jan 12, 2018 at 10:25 AM, Primiano Tucci <prim...@chromium.org> wrote:On Fri, Jan 12, 2018 at 4:03 PM Nico Weber <tha...@chromium.org> wrote:I just realized that this won't help you with test-only code that's e.g. in a static_library() instead of a test() :-/Even in that case, wouldn't such a static_library be marked with testonly=true? What are the cases where we have a test-only translation unit in a non testonly target? I'd be surprised if we had gtest fixtures (I think we are secretly talking about those, which need static initializers) linked in production code.There aren't any; GN won't let you do that.However, I think the point was is that if you have a test binary, you're using the test() template and we can remove the config there (in one place). We can't do that for a vanilla test-only static_library/source_set/etc. so, we'd have to replace them with test_static_library(), test_source_set(), etc.
I'm still not clear on why we can't remove from all test configs but can we add to all? i.e. will adding the overridding -Wno-global-constructors flag work?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAJTZ7LKVPf%2Bpqa5u0iQ9Ois%3DDoZ55G4muM0ZNXZ%2BuWrLfnbtTA%40mail.gmail.com.