[build] update Boost to 1.69 and remove RTTI
This commit is contained in:
@@ -88,6 +88,8 @@ else()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wno-variadic-macros -Wno-unknown-pragmas")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
|
||||
|
||||
if(APPLE AND CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
|
||||
# -Wno-error=unused-command-line-argument is required due to https://llvm.org/bugs/show_bug.cgi?id=7798
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=unused-command-line-argument")
|
||||
|
||||
@@ -2,6 +2,9 @@ add_executable(mbgl-glfw
|
||||
platform/glfw/main.cpp
|
||||
)
|
||||
|
||||
# args requires RTTI
|
||||
set_source_files_properties(platform/glfw/main.cpp PROPERTIES COMPILE_OPTIONS "-frtti")
|
||||
|
||||
target_sources(mbgl-glfw
|
||||
PRIVATE platform/glfw/glfw_view.hpp
|
||||
PRIVATE platform/glfw/glfw_view.cpp
|
||||
|
||||
@@ -2,6 +2,9 @@ add_executable(mbgl-offline
|
||||
bin/offline.cpp
|
||||
)
|
||||
|
||||
# args requires RTTI
|
||||
set_source_files_properties(bin/offline.cpp PROPERTIES COMPILE_OPTIONS "-frtti")
|
||||
|
||||
target_sources(mbgl-offline
|
||||
PRIVATE platform/default/include/mbgl/util/default_styles.hpp
|
||||
)
|
||||
|
||||
@@ -2,6 +2,9 @@ add_executable(mbgl-render
|
||||
bin/render.cpp
|
||||
)
|
||||
|
||||
# args requires RTTI
|
||||
set_source_files_properties(bin/render.cpp PROPERTIES COMPILE_OPTIONS "-frtti")
|
||||
|
||||
target_include_directories(mbgl-render
|
||||
PRIVATE platform/default/include
|
||||
)
|
||||
|
||||
@@ -76,7 +76,7 @@ android {
|
||||
cmake {
|
||||
arguments "-DANDROID_TOOLCHAIN=clang"
|
||||
arguments "-DANDROID_STL=" + stl
|
||||
arguments "-DANDROID_CPP_FEATURES=rtti;exceptions"
|
||||
arguments "-DANDROID_CPP_FEATURES=exceptions"
|
||||
arguments "-DMBGL_PLATFORM=android"
|
||||
arguments "-DMASON_PLATFORM=android"
|
||||
arguments "-DNodeJS_EXECUTABLE=" + node
|
||||
|
||||
@@ -3804,6 +3804,7 @@
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_CPP_RTTI = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "";
|
||||
"GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = "";
|
||||
@@ -4064,6 +4065,7 @@
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_CPP_RTTI = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
@@ -4130,6 +4132,7 @@
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_CPP_RTTI = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "";
|
||||
"GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = "";
|
||||
|
||||
@@ -1933,6 +1933,7 @@
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_CPP_RTTI = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
@@ -1997,6 +1998,7 @@
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_CPP_RTTI = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
|
||||
|
||||
31
scripts/update-boost.sh
Executable file
31
scripts/update-boost.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
|
||||
pushd "$BOOST"
|
||||
if [ ! -f dist/bin/bcp ]; then
|
||||
# Build bcp
|
||||
./bootstrap.sh
|
||||
./b2 tools/bcp
|
||||
fi
|
||||
popd
|
||||
|
||||
# Extract boost modules that we need
|
||||
rm -rf vendor/boost/include
|
||||
mkdir -p vendor/boost/include
|
||||
"$BOOST/dist/bin/bcp" --boost="$BOOST" --scan $(find {src,include,test,platform,bin} -name "*.cpp" -o -name "*.hpp") vendor/boost/include
|
||||
|
||||
pushd vendor/boost
|
||||
VERSION=$(sed -n 's/^#define BOOST_LIB_VERSION "\([^"]*\)"$/\1/p' include/boost/version.hpp)
|
||||
echo "libboost ${VERSION/_/.} for Mapbox GL Native" > README.md
|
||||
git add README.md include
|
||||
popd
|
||||
|
||||
echo "If everything works, run:"
|
||||
echo ""
|
||||
echo " git -C vendor/boost checkout master"
|
||||
echo " git -C vendor/boost commit -m \"update boost to ${VERSION/_/.}\""
|
||||
echo " git -C vendor/boost push"
|
||||
echo " git add vendor/boost"
|
||||
echo ""
|
||||
echo "and commit."
|
||||
@@ -136,7 +136,6 @@ void RenderFillExtrusionLayer::render(PaintParameters& parameters, RenderSource*
|
||||
continue;
|
||||
}
|
||||
const auto fillPatternValue = evaluated.get<FillExtrusionPattern>().constantOr(mbgl::Faded<std::basic_string<char> >{"", ""});
|
||||
assert(dynamic_cast<GeometryTile*>(&tile.tile));
|
||||
GeometryTile& geometryTile = static_cast<GeometryTile&>(tile.tile);
|
||||
optional<ImagePosition> patternPosA = geometryTile.getPattern(fillPatternValue.from);
|
||||
optional<ImagePosition> patternPosB = geometryTile.getPattern(fillPatternValue.to);
|
||||
|
||||
@@ -147,7 +147,6 @@ void RenderFillLayer::render(PaintParameters& parameters, RenderSource*) {
|
||||
}
|
||||
const auto fillPatternValue = evaluated.get<FillPattern>().constantOr(Faded<std::basic_string<char>>{"", ""});
|
||||
for (const RenderTile& tile : renderTiles) {
|
||||
assert(dynamic_cast<GeometryTile*>(&tile.tile));
|
||||
GeometryTile& geometryTile = static_cast<GeometryTile&>(tile.tile);
|
||||
optional<ImagePosition> patternPosA = geometryTile.getPattern(fillPatternValue.from);
|
||||
optional<ImagePosition> patternPosB = geometryTile.getPattern(fillPatternValue.to);
|
||||
|
||||
@@ -128,7 +128,6 @@ void RenderLineLayer::render(PaintParameters& parameters, RenderSource*) {
|
||||
|
||||
} else if (!unevaluated.get<LinePattern>().isUndefined()) {
|
||||
const auto linePatternValue = evaluated.get<LinePattern>().constantOr(Faded<std::basic_string<char>>{ "", ""});
|
||||
assert(dynamic_cast<GeometryTile*>(&tile.tile));
|
||||
GeometryTile& geometryTile = static_cast<GeometryTile&>(tile.tile);
|
||||
const Size texsize = geometryTile.iconAtlasTexture->size;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ void SpriteLoader::load(const std::string& url, Scheduler& scheduler, FileSource
|
||||
} else if (res.notModified) {
|
||||
return;
|
||||
} else if (res.noContent) {
|
||||
loader->json = std::make_shared<const std::string>();
|
||||
loader->json = std::make_shared<std::string>();
|
||||
emitSpriteLoadedIfComplete();
|
||||
} else {
|
||||
// Only trigger a sprite loaded event we got new data.
|
||||
@@ -70,7 +70,7 @@ void SpriteLoader::load(const std::string& url, Scheduler& scheduler, FileSource
|
||||
} else if (res.notModified) {
|
||||
return;
|
||||
} else if (res.noContent) {
|
||||
loader->image = std::make_shared<const std::string>();
|
||||
loader->image = std::make_shared<std::string>();
|
||||
emitSpriteLoadedIfComplete();
|
||||
} else {
|
||||
loader->image = res.data;
|
||||
|
||||
2
vendor/boost
vendored
2
vendor/boost
vendored
Submodule vendor/boost updated: e841ea9b8f...2499bc0982
782
vendor/boost-files.json
vendored
782
vendor/boost-files.json
vendored
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user