Skip to content

Commit

Permalink
VPL と Blend2S にも _LIBCPP_HARDENING_MODE を指定する
Browse files Browse the repository at this point in the history
  • Loading branch information
enm10k committed Jan 16, 2024
1 parent dfbd303 commit 691c346
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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')
Expand All @@ -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")
Expand All @@ -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)

Expand Down

0 comments on commit 691c346

Please sign in to comment.