Skip to content

Commit

Permalink
Merge branch 'release/2024.3.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
melpon committed Mar 7, 2024
2 parents caffc57 + 9dbfdd8 commit 3bb332a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 19 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

## develop

## 2024.3.1 (2024-03-07)

- [FIX] Sora C++ SDK を利用してビルドする時に自動的に _LIBCPP_HARDENING_MODE が定義されるように修正
- @melpon

## 2024.3.0 (2024-03-07)

- [CHANGE] Lyra を Sora C++ SDK から外し、Lyra に関連するファイルや関数、オプションを除ける
Expand All @@ -35,6 +40,8 @@
- [ADD] Android 向けに音声出力先変更機能として `SoraAudioManager` を追加する
- Android では C++ を経由した OS の API 利用が煩雑となるため、Java で実装し、Sora.aar をビルドして提供を行う
- Sora.aar ファイルは Android のパッケージに含める
- iOS 向けとは異なりインスタンス生成が必要
- API レベル 31 でオーディオデバイスの切り替えや Bluetooth ヘッドセットのスイッチングの API が変更となり、API レベルに応じて処理を切り替える必要があったため
- @tnoho

## 2024.2.0 (2024-03-04)
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ elseif (SORA_TARGET_OS STREQUAL "android")
_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS
_LIBCPP_ENABLE_NODISCARD
_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE
# https://github.com/boostorg/container_hash/issues/22 と同じ問題が clang-15 でも起きるので、これを手動で定義して回避する
BOOST_NO_CXX98_FUNCTION_BASE
)
Expand All @@ -411,6 +412,7 @@ elseif (SORA_TARGET_OS STREQUAL "ubuntu")
_LIBCPP_ABI_NAMESPACE=Cr
_LIBCPP_ABI_VERSION=2
_LIBCPP_DISABLE_AVAILABILITY
_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE
# https://github.com/boostorg/container_hash/issues/22 と同じ問題が clang-15 でも起きるので、これを手動で定義して回避する
BOOST_NO_CXX98_FUNCTION_BASE
)
Expand Down Expand Up @@ -498,6 +500,7 @@ elseif (SORA_TARGET_OS STREQUAL "jetson")
_LIBCPP_ABI_NAMESPACE=Cr
_LIBCPP_ABI_VERSION=2
_LIBCPP_DISABLE_AVAILABILITY
_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE
# https://github.com/boostorg/container_hash/issues/22 と同じ問題が clang-15 でも起きるので、これを手動で定義して回避する
BOOST_NO_CXX98_FUNCTION_BASE
)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SORA_CPP_SDK_VERSION=2024.3.0
SORA_CPP_SDK_VERSION=2024.3.1
WEBRTC_BUILD_VERSION=m121.6167.3.0
BOOST_VERSION=1.84.0
CMAKE_VERSION=3.28.1
Expand Down
32 changes: 16 additions & 16 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1659,8 +1659,6 @@ def main():
cmake_args.append(
f"-DLIBCXX_INCLUDE_DIR={cmake_path(os.path.join(webrtc_info.libcxx_dir, 'include'))}"
)
cxxflags = ["-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE"]
cmake_args.append(f"-DCMAKE_CXX_FLAGS={' '.join(cxxflags)}")
if platform.target.os == "macos":
sysroot = cmdcap(["xcrun", "--sdk", "macosx", "--show-sdk-path"])
target = (
Expand Down Expand Up @@ -1706,8 +1704,6 @@ def main():
cmake_args.append(
f"-DSORA_WEBRTC_LDFLAGS={os.path.join(install_dir, 'webrtc.ldflags')}"
)
cxxflags = ["-D_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 @@ -1727,8 +1723,6 @@ def main():
f"-DCMAKE_CXX_COMPILER={cmake_path(os.path.join(webrtc_info.clang_dir, 'bin', 'clang++'))}"
)
cmake_args.append("-DUSE_JETSON_ENCODER=ON")
cxxflags = ["-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE"]
cmake_args.append(f"-DCMAKE_CXX_FLAGS={' '.join(cxxflags)}")

# NvCodec
if platform.target.os in ("windows", "ubuntu") and platform.target.arch == "x86_64":
Expand Down Expand Up @@ -1792,13 +1786,23 @@ def main():
os.path.join(install_dir, "sora", "lib", "libsora.a"),
)

if platform.target.os == 'android':
if platform.target.os == "android":
# Android の場合のみライブラリをビルドする
with cd(os.path.join(BASE_DIR, 'android', 'Sora')):
cmd(['./gradlew', '--no-daemon', 'assembleRelease'])
shutil.copyfile(os.path.join(BASE_DIR, 'android', 'Sora', 'Sora',
'build', 'outputs', 'aar', 'Sora-release.aar'),
os.path.join(install_dir, 'sora', 'lib', 'Sora.aar'))
with cd(os.path.join(BASE_DIR, "android", "Sora")):
cmd(["./gradlew", "--no-daemon", "assembleRelease"])
shutil.copyfile(
os.path.join(
BASE_DIR,
"android",
"Sora",
"Sora",
"build",
"outputs",
"aar",
"Sora-release.aar",
),
os.path.join(install_dir, "sora", "lib", "Sora.aar"),
)

if args.test:
if platform.target.os == "ios":
Expand Down Expand Up @@ -1874,8 +1878,6 @@ def main():
cmake_args.append(
f"-DLIBCXX_INCLUDE_DIR={cmake_path(os.path.join(webrtc_info.libcxx_dir, 'include'))}"
)
cxxflags = ["-D_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("-DJETSON=ON")
Expand All @@ -1899,8 +1901,6 @@ def main():
cmake_args.append(
f"-DCMAKE_CXX_COMPILER={cmake_path(os.path.join(webrtc_info.clang_dir, 'bin', 'clang++'))}"
)
cxxflags = ["-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE"]
cmake_args.append(f"-DCMAKE_CXX_FLAGS={' '.join(cxxflags)}")

if platform.target.os in ("windows", "macos", "ubuntu"):
cmake_args.append("-DTEST_CONNECT_DISCONNECT=ON")
Expand Down
3 changes: 1 addition & 2 deletions test/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ android {
"-DANDROID_ABI=arm64-v8a",
"-DANDROID_CPP_FEATURES=exceptions rtti",
"-DANDROID_NDK=$projectDir/../../../_install/android/release/android-ndk",
"-DCMAKE_ANDROID_EXCEPTIONS=ON",
"-DCMAKE_CXX_FLAGS='-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE'"
"-DCMAKE_ANDROID_EXCEPTIONS=ON"
}
ndk {
abiFilters 'arm64-v8a'
Expand Down

0 comments on commit 3bb332a

Please sign in to comment.