diff options
author | Mike Morris <michael.patrick.morris@gmail.com> | 2015-10-15 13:59:31 -0400 |
---|---|---|
committer | Mike Morris <michael.patrick.morris@gmail.com> | 2015-11-02 18:41:34 -0500 |
commit | 79a5a960370a1bfcb8a90a628d85b8cd6d9b6a76 (patch) | |
tree | 5c418cf49c67eefc251a94606cf8e0b4e6d7d9a7 | |
parent | ba7cc755e74006b14b46b13b65a100a519e402f3 (diff) | |
download | qtlocation-mapboxgl-79a5a960370a1bfcb8a90a628d85b8cd6d9b6a76.tar.gz |
[core] mason geojsonvt-2.1.6.3
- [osx] set -fvisibility-inlines-hidden in gyp/common.gypi to silence
mismatched visibility linker warnings
- [linux] set cxx_host in GYP_FLAGS to set -fabi-version=0 on gcc builds
to use clang-built mason binaries
- [ios] update symbol visibility for iOS tests
- [ios] link libgeojsonvt.a in iOS tests xcodeproj
- add libgeojsonvt.a to General -> Linked Frameworks and Libraries
- add mason_packages (recursive) to Build Settings -> Library Search Path
- [ios] add libuv and geojsonvt first in iOS libtool smush to ensure symbols
are found by later compilation units where they are undefined
-rw-r--r-- | .gitmodules | 3 | ||||
-rwxr-xr-x | configure | 1 | ||||
-rw-r--r-- | gyp/common.gypi | 11 | ||||
-rw-r--r-- | gyp/core.gypi | 2 | ||||
-rw-r--r-- | scripts/android/configure.sh | 1 | ||||
-rw-r--r-- | scripts/ios/configure.sh | 1 | ||||
-rwxr-xr-x | scripts/ios/package.sh | 10 | ||||
-rw-r--r-- | scripts/linux/configure.sh | 1 | ||||
-rw-r--r-- | scripts/main.mk | 10 | ||||
-rw-r--r-- | scripts/osx/configure.sh | 1 | ||||
-rwxr-xr-x | scripts/osx/run.sh | 3 | ||||
-rw-r--r-- | src/mbgl/annotation/shape_annotation_impl.cpp | 5 | ||||
-rw-r--r-- | src/mbgl/annotation/shape_annotation_impl.hpp | 3 | ||||
m--------- | src/mbgl/util/geojsonvt | 0 | ||||
-rw-r--r-- | test/ios/ios-tests.xcodeproj/project.pbxproj | 9 | ||||
-rw-r--r-- | test/test.gypi | 2 |
16 files changed, 43 insertions, 20 deletions
diff --git a/.gitmodules b/.gitmodules index b87049ba1d..782e549df2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,6 +10,3 @@ path = platform/ios/vendor/SMCalloutView url = https://github.com/nfarina/calloutview.git -[submodule "src/mbgl/util/geojsonvt"] - path = src/mbgl/util/geojsonvt - url = https://github.com/mapbox/geojson-vt-cpp @@ -93,6 +93,7 @@ print_flags libuv static_libs cflags ldflags print_flags zlib static_libs cflags ldflags print_flags nunicode static_libs cflags ldflags print_flags libzip static_libs cflags ldflags +print_flags geojsonvt static_libs cflags ldflags print_flags variant static_libs cflags ldflags print_flags rapidjson static_libs cflags ldflags print_flags gtest static_libs cflags ldflags diff --git a/gyp/common.gypi b/gyp/common.gypi index 5871779a2e..b3834934d3 100644 --- a/gyp/common.gypi +++ b/gyp/common.gypi @@ -44,6 +44,13 @@ 'cflags_cc': [ '-Wno-unknown-pragmas', # We are using '#pragma mark', but it is only available on Darwin. ], + 'conditions': [ + ['cxx_host != "clang"', { + 'cflags_cc': [ + '-fabi-version=0', + ], + }], + ] }], ], 'target_conditions': [ @@ -84,8 +91,8 @@ 'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL': '0', 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES', + 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', 'DEAD_CODE_STRIPPING': 'NO', - 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'NO', 'OTHER_CPLUSPLUSFLAGS': [ '-fno-omit-frame-pointer','-fwrapv', '-fstack-protector-all', '-fno-common'] } }, @@ -95,8 +102,8 @@ 'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL': '3', 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES', + 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', 'DEAD_CODE_STRIPPING': 'NO', - 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'NO' } }, }, diff --git a/gyp/core.gypi b/gyp/core.gypi index 08c5eac013..1156059e0b 100644 --- a/gyp/core.gypi +++ b/gyp/core.gypi @@ -31,6 +31,7 @@ '<@(libuv_cflags)', '<@(opengl_cflags)', '<@(boost_cflags)', + '<@(geojsonvt_cflags)', '<@(variant_cflags)', '<@(rapidjson_cflags)', ], @@ -47,6 +48,7 @@ ], 'libraries': [ '<@(libuv_static_libs)', + '<@(geojsonvt_static_libs)', ], }, diff --git a/scripts/android/configure.sh b/scripts/android/configure.sh index 1a42736c2f..2642584415 100644 --- a/scripts/android/configure.sh +++ b/scripts/android/configure.sh @@ -10,6 +10,7 @@ LIBUV_VERSION=1.7.5 ZLIB_VERSION=system NUNICODE_VERSION=1.6 LIBZIP_VERSION=0.11.2 +GEOJSONVT_VERSION=2.1.6.3 VARIANT_VERSION=1.0 RAPIDJSON_VERSION=1.0.2 diff --git a/scripts/ios/configure.sh b/scripts/ios/configure.sh index 020c70b797..7eb4a5b416 100644 --- a/scripts/ios/configure.sh +++ b/scripts/ios/configure.sh @@ -4,5 +4,6 @@ BOOST_VERSION=1.59.0 SQLITE_VERSION=system LIBUV_VERSION=1.7.5 ZLIB_VERSION=system +GEOJSONVT_VERSION=2.1.6.3 VARIANT_VERSION=1.0 RAPIDJSON_VERSION=1.0.2 diff --git a/scripts/ios/package.sh b/scripts/ios/package.sh index ec0b4204dd..e5edc2789a 100755 --- a/scripts/ios/package.sh +++ b/scripts/ios/package.sh @@ -74,15 +74,17 @@ step "Building static library..." LIBS=(core.a platform-ios.a asset-fs.a cache-sqlite.a http-nsurl.a) if [[ "${BUILD_FOR_DEVICE}" == true ]]; then libtool -static -no_warning_for_no_symbols \ + `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libuv.a` \ + `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a` \ -o ${OUTPUT}/static/lib${NAME}.a \ ${LIBS[@]/#/build/${BUILDTYPE}-iphoneos/libmbgl-} \ - ${LIBS[@]/#/build/${BUILDTYPE}-iphonesimulator/libmbgl-} \ - `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libuv.a` + ${LIBS[@]/#/build/${BUILDTYPE}-iphonesimulator/libmbgl-} else libtool -static -no_warning_for_no_symbols \ + `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libuv.a` \ + `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a` \ -o ${OUTPUT}/static/lib${NAME}.a \ - ${LIBS[@]/#/build/${BUILDTYPE}-iphonesimulator/libmbgl-} \ - `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libuv.a` + ${LIBS[@]/#/build/${BUILDTYPE}-iphonesimulator/libmbgl-} fi echo "Created ${OUTPUT}/static/lib${NAME}.a" diff --git a/scripts/linux/configure.sh b/scripts/linux/configure.sh index 9041bf084a..f270c903ee 100644 --- a/scripts/linux/configure.sh +++ b/scripts/linux/configure.sh @@ -11,6 +11,7 @@ LIBUV_VERSION=1.7.5 ZLIB_VERSION=system NUNICODE_VERSION=1.6 LIBZIP_VERSION=1.0.1 +GEOJSONVT_VERSION=2.1.6.3 VARIANT_VERSION=1.0 RAPIDJSON_VERSION=1.0.2 GTEST_VERSION=1.7.0 diff --git a/scripts/main.mk b/scripts/main.mk index 75e574d26d..15e3484e01 100644 --- a/scripts/main.mk +++ b/scripts/main.mk @@ -22,6 +22,11 @@ ifneq (,$(wildcard scripts/$(HOST)/$(HOST_VERSION)/configure.sh)) CONFIGURE_FILES += scripts/$(HOST)/$(HOST_VERSION)/configure.sh endif +ifneq (,$(findstring clang,$(CXX))) + CXX_HOST = "clang" +else ifneq (,$(findstring g++,$(CXX))) + CXX_HOST = "g++" +endif # Text formatting TEXT_BOLD = \033[1m @@ -38,10 +43,6 @@ SUBMODULES += .mason/mason.sh .mason/mason.sh: ./scripts/flock.py .git/Submodule.lock git submodule update --init .mason -SUBMODULES += src/mbgl/util/geojsonvt/geojsonvt.hpp -src/mbgl/util/geojsonvt/geojsonvt.hpp: - ./scripts/flock.py .git/Submodule.lock git submodule update --init src/mbgl/util/geojsonvt - ifeq ($(HOST),ios) SUBMODULES += platform/ios/vendor/SMCalloutView/SMCalloutView.h platform/ios/vendor/SMCalloutView/SMCalloutView.h: @@ -70,6 +71,7 @@ GYP_FLAGS += -Dcache_lib=$(CACHE) GYP_FLAGS += -Dheadless_lib=$(HEADLESS) GYP_FLAGS += -Dtest=$(BUILD_TEST) GYP_FLAGS += -Drender=$(BUILD_RENDER) +GYP_FLAGS += -Dcxx_host=$(CXX_HOST) GYP_FLAGS += --depth=. GYP_FLAGS += -Goutput_dir=. GYP_FLAGS += --generator-output=./build/$(HOST_SLUG) diff --git a/scripts/osx/configure.sh b/scripts/osx/configure.sh index a325273a7d..34024a40f4 100644 --- a/scripts/osx/configure.sh +++ b/scripts/osx/configure.sh @@ -11,6 +11,7 @@ LIBUV_VERSION=1.7.5 ZLIB_VERSION=system NUNICODE_VERSION=1.6 LIBZIP_VERSION=1.0.1 +GEOJSONVT_VERSION=2.1.6.3 VARIANT_VERSION=1.0 RAPIDJSON_VERSION=1.0.2 GTEST_VERSION=1.7.0 diff --git a/scripts/osx/run.sh b/scripts/osx/run.sh index 1020879471..28c1adba1b 100755 --- a/scripts/osx/run.sh +++ b/scripts/osx/run.sh @@ -11,9 +11,6 @@ BUILDTYPE=${BUILDTYPE:-Release} # Build ################################################################################ -mapbox_time "checkout_geojsonvt" \ -git submodule update --init src/mbgl/util/geojsonvt - mapbox_time "compile_program" \ make xosx -j${JOBS} BUILDTYPE=${BUILDTYPE} diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp index a8d18b8463..f84946fe11 100644 --- a/src/mbgl/annotation/shape_annotation_impl.cpp +++ b/src/mbgl/annotation/shape_annotation_impl.cpp @@ -1,7 +1,8 @@ +#include <mapbox/geojsonvt/geojsonvt_convert.hpp> + #include <mbgl/annotation/shape_annotation_impl.hpp> #include <mbgl/annotation/annotation_manager.hpp> #include <mbgl/annotation/annotation_tile.hpp> -#include <mbgl/util/geojsonvt/geojsonvt_convert.hpp> #include <mbgl/util/constants.hpp> #include <mbgl/util/string.hpp> #include <mbgl/style/style.hpp> @@ -142,7 +143,7 @@ void ShapeAnnotationImpl::updateTile(const TileID& tileID, AnnotationTile& tile) assert(featureType != FeatureType::Unknown); GeometryCollection renderGeometry; - for (auto& shapeGeometry : shapeFeature.geometry) { + for (auto& shapeGeometry : shapeFeature.tileGeometry) { std::vector<Coordinate> renderLine; auto& shapeRing = shapeGeometry.get<TileRing>(); diff --git a/src/mbgl/annotation/shape_annotation_impl.hpp b/src/mbgl/annotation/shape_annotation_impl.hpp index 1b1dacf370..8c703f664c 100644 --- a/src/mbgl/annotation/shape_annotation_impl.hpp +++ b/src/mbgl/annotation/shape_annotation_impl.hpp @@ -1,10 +1,11 @@ #ifndef MBGL_SHAPE_ANNOTATION_IMPL #define MBGL_SHAPE_ANNOTATION_IMPL +#include <mapbox/geojsonvt/geojsonvt.hpp> + #include <mbgl/annotation/annotation.hpp> #include <mbgl/annotation/shape_annotation.hpp> #include <mbgl/util/geo.hpp> -#include <mbgl/util/geojsonvt/geojsonvt.hpp> #include <memory> #include <string> diff --git a/src/mbgl/util/geojsonvt b/src/mbgl/util/geojsonvt deleted file mode 160000 -Subproject 83bffbcc6ad75ff59c7640036567820c8932161 diff --git a/test/ios/ios-tests.xcodeproj/project.pbxproj b/test/ios/ios-tests.xcodeproj/project.pbxproj index 34724effc8..0a60c89073 100644 --- a/test/ios/ios-tests.xcodeproj/project.pbxproj +++ b/test/ios/ios-tests.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 7D3A84F41BC844970041A655 /* libgeojsonvt.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D3A84F31BC844970041A655 /* libgeojsonvt.a */; }; 96567A231B0E84CD00D78776 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 96567A221B0E84CD00D78776 /* LaunchScreen.xib */; }; 96567A311B0E8BB900D78776 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96567A301B0E8BB900D78776 /* Images.xcassets */; }; DD043363196DBBD500E6F39D /* MGLTAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DD04335F196DBBD500E6F39D /* MGLTAppDelegate.m */; }; @@ -74,6 +75,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 7D3A84F31BC844970041A655 /* libgeojsonvt.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgeojsonvt.a; path = "../../mason_packages/ios-9.0/geojsonvt/2.1.6/lib/libgeojsonvt.a"; sourceTree = "<group>"; }; 96567A221B0E84CD00D78776 /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = SOURCE_ROOT; }; 96567A301B0E8BB900D78776 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = SOURCE_ROOT; }; DACAD7111B08719F009119DC /* MGLMapboxEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MGLMapboxEvents.h; path = ../../platform/ios/MGLMapboxEvents.h; sourceTree = SOURCE_ROOT; }; @@ -141,6 +143,7 @@ DD41CE0D1ACB5DCB00FA7979 /* libc++.dylib in Frameworks */, DD41CE0F1ACB5DD000FA7979 /* libsqlite3.dylib in Frameworks */, DD41CE111ACB5DD500FA7979 /* libz.dylib in Frameworks */, + 7D3A84F41BC844970041A655 /* libgeojsonvt.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -179,6 +182,7 @@ DD043325196DB9BC00E6F39D /* Frameworks */ = { isa = PBXGroup; children = ( + 7D3A84F31BC844970041A655 /* libgeojsonvt.a */, DD0580EF1ACB62BE00B112C9 /* CoreGraphics.framework */, DD41CE081ACB5DBC00FA7979 /* CoreTelephony.framework */, DD41CE161ACB5DE700FA7979 /* GLKit.framework */, @@ -510,7 +514,7 @@ "DEBUG=1", "$(inherited)", ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -544,6 +548,7 @@ COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -572,6 +577,7 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", ../../build/ios/pkg/static, + "../../mason_packages/**", ); OTHER_LDFLAGS = "-ObjC"; PRODUCT_BUNDLE_IDENTIFIER = "com.mapbox.${PRODUCT_NAME:rfc1034identifier}"; @@ -596,6 +602,7 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", ../../build/ios/pkg/static, + "../../mason_packages/**", ); OTHER_LDFLAGS = "-ObjC"; PRODUCT_BUNDLE_IDENTIFIER = "com.mapbox.${PRODUCT_NAME:rfc1034identifier}"; diff --git a/test/test.gypi b/test/test.gypi index e8d9a9fcc7..1f9496662b 100644 --- a/test/test.gypi +++ b/test/test.gypi @@ -97,6 +97,7 @@ '<@(gtest_static_libs)', '<@(libuv_static_libs)', '<@(sqlite_static_libs)', + '<@(geojsonvt_static_libs)', ], 'variables': { 'cflags_cc': [ @@ -105,6 +106,7 @@ '<@(opengl_cflags)', '<@(boost_cflags)', '<@(sqlite_cflags)', + '<@(geojsonvt_cflags)', '<@(variant_cflags)', '<@(rapidjson_cflags)', ], |