Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[ios] Don't link libmbgl-core twice; fix CI build by exposing core classes - #15724

Closed
julianrex wants to merge 2 commits into
masterfrom
jrex/fix-ci-target-dont-link-twice
Closed

julianrex wants to merge 2 commits into
masterfrom
jrex/fix-ci-target-dont-link-twice

Conversation

@julianrex

@julianrex julianrex commented Sep 27, 2019 •

Copy link
Copy Markdown
Contributor

In the process of investigating why #15650 test was failing, we discovered that the test target was explicitly linking with libmbgl-core.a causing duplicate globals.

This PR removes the explicit link, but this has required exposing some core classes by adding the visibility attribute.

This may be something that we don't want to do in general, if so we could consider adding a TEST configuration for this purpose.

EDIT: Whoops - I edited the autogenerated files!

@julianrex julianrex added iOS Mapbox Maps SDK for iOS Core The cross-platform C++ core, aka mbgl needs discussion labels Sep 27, 2019
@julianrex
julianrex requested review from a team, fabian-guerra and tmpsantos and removed request for a team September 27, 2019 16:57
@julianrex julianrex added this to the release-sangria milestone Sep 27, 2019
@julianrex julianrex self-assigned this Sep 27, 2019
@julianrex

julianrex commented Sep 27, 2019 •

Copy link
Copy Markdown
Contributor Author

@alexshalamov not sure what needs to be done here re clang-format (and the other failing test(s)). Can you help?

@tmpsantos tmpsantos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is the wrong solution for this problem. Making these methods MBGL_EXPORT will make them visible when building a shared library and also gonna remove any possibility of LTO for these code path.

} // namespace util

class NetworkStatus {
class MBGL_EXPORT NetworkStatus {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not expose these symbols if we build a static library.

@julianrex

Copy link
Copy Markdown
Contributor Author

I believe this is the wrong solution for this problem. Making these methods MBGL_EXPORT will make them visible when building a shared library

Yep, that was my concern. We'll look at exposing the methods we use at a higher level (or doing something else) /cc @fabian-guerra

@julianrex

Copy link
Copy Markdown
Contributor Author

Closing this PR in favour of a future one.

@julianrex julianrex closed this Oct 1, 2019
@tmpsantos
tmpsantos deleted the jrex/fix-ci-target-dont-link-twice branch October 2, 2019 15:09
@tmpsantos

Copy link
Copy Markdown
Contributor

Closing this PR in favour of a future one

The /next should address this.

@tmpsantos

Copy link
Copy Markdown
Contributor

The /next should address this.

The new buildsystem located at /next won't have this problem because it makes a distinction between what is Core and Platform.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Core The cross-platform C++ core, aka mbgl iOS Mapbox Maps SDK for iOS needs discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants