From 691c346f8a52e830a266d833e1d49c80559a1f3b Mon Sep 17 00:00:00 2001 From: enm10k Date: Tue, 16 Jan 2024 22:19:58 +0900 Subject: [PATCH] =?UTF-8?q?VPL=20=E3=81=A8=20Blend2S=20=E3=81=AB=E3=82=82?= =?UTF-8?q?=20=5FLIBCPP=5FHARDENING=5FMODE=20=E3=82=92=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/run.py b/run.py index 91bf8b96..290e531c 100644 --- a/run.py +++ b/run.py @@ -1413,7 +1413,8 @@ def install_deps(platform: Platform, source_dir, build_dir, install_dir, debug, flags = [ '-nostdinc++', '-D_LIBCPP_ABI_NAMESPACE=Cr', '-D_LIBCPP_ABI_VERSION=2', '-D_LIBCPP_DISABLE_AVAILABILITY', '-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS', - '-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS', '-D_LIBCPP_ENABLE_NODISCARD'] + '-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS', '-D_LIBCPP_ENABLE_NODISCARD', + '-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE'] cmake_args.append(f"-DCMAKE_CXX_FLAGS={' '.join(flags)}") install_vpl_args['cmake_args'] += cmake_args install_vpl(**install_vpl_args) @@ -1493,7 +1494,8 @@ def install_deps(platform: Platform, source_dir, build_dir, install_dir, debug, f"-DCMAKE_CXX_COMPILER={cmake_path(os.path.join(webrtc_info.clang_dir, 'bin', 'clang++'))}") path = cmake_path(os.path.join(webrtc_info.libcxx_dir, 'include')) cmake_args.append(f"-DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES={path}") - cmake_args.append(f"-DCMAKE_CXX_FLAGS={' '.join(['-nostdinc++'])}") + cxxflags = ['-nostdinc++', '_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE'] + cmake_args.append(f"-DCMAKE_CXX_FLAGS={' '.join(cxxflags)}") if platform.target.os == 'jetson': sysroot = os.path.join(install_dir, 'rootfs') cmake_args.append('-DCMAKE_SYSTEM_NAME=Linux') @@ -1512,7 +1514,8 @@ def install_deps(platform: Platform, source_dir, build_dir, install_dir, debug, cmake_args.append('-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH') path = cmake_path(os.path.join(webrtc_info.libcxx_dir, 'include')) cmake_args.append(f"-DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES={path}") - cmake_args.append(f"-DCMAKE_CXX_FLAGS={' '.join(['-nostdinc++'])}") + cxxflags = ['-nostdinc++', '_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE'] + cmake_args.append(f"-DCMAKE_CXX_FLAGS={' '.join(cxxflags)}") if platform.target.os == 'ios': cmake_args += ['-G', 'Xcode'] cmake_args.append("-DCMAKE_SYSTEM_NAME=iOS") @@ -1535,7 +1538,8 @@ def install_deps(platform: Platform, source_dir, build_dir, install_dir, debug, # https://github.com/android/ndk/issues/1618 cmake_args.append('-DCMAKE_ANDROID_EXCEPTIONS=ON') cmake_args.append('-DANDROID_NDK=OFF') - cmake_args.append(f"-DCMAKE_CXX_FLAGS={' '.join(['-nostdinc++'])}") + cxxflags = ['-nostdinc++', '_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE'] + cmake_args.append(f"-DCMAKE_CXX_FLAGS={' '.join(cxxflags)}") install_blend2d_args['cmake_args'] = cmake_args install_blend2d(**install_blend2d_args)