Skip to content

Commit 7749a55

Browse files
committed
add debug release option to openssl
1 parent 022161f commit 7749a55

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

build/ios/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,13 @@ do
220220
if [ $lib = "curl" ]; then
221221
mkdir -p ssl/prebuilt/
222222
cp $top_dir/contrib/$install_library_path/$arch/lib/libssl.a ssl/prebuilt/libssl-$arch.a
223+
223224
mkdir -p crypto/prebuilt/
224225
cp $top_dir/contrib/$install_library_path/$arch/lib/libcrypto.a crypto/prebuilt/libcrypto-$arch.a
226+
227+
echo "copying libz..."
228+
mkdir -p z/prebuilt/
229+
cp $top_dir/contrib/$install_library_path/$arch/lib/libz.a z/prebuilt/libz-$arch.a
225230
fi
226231

227232
if [ $lib = "png" ]; then
@@ -255,6 +260,7 @@ do
255260
if [ $lib = "curl" ]; then
256261
create_fat_library ssl
257262
create_fat_library crypto
263+
create_fat_library z
258264
fi
259265

260266
if [ $lib = "png" ]; then

contrib/build_ios.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ fi
218218
echo "EXTRA_CFLAGS = ${EXTRA_CFLAGS}" >> config.mak
219219
echo "EXTRA_LDFLAGS = ${EXTRA_LDFLAGS}" >> config.mak
220220
echo "IOS_ARCH := ${ARCH}" >> config.mak
221+
echo "BUILD_MODE := ${BUILD_MODE}" >> config.mak
222+
221223
make fetch
222224
make list
223225
make

contrib/src/luajit/rules.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ ifeq ($(LUAJIT_VERSION),2.0.1)
1414
$(APPLY) $(SRC)/luajit/v2.0.1_hotfix1.patch
1515
endif
1616
$(MOVE)
17+
1718
#FIXME: arm64 is not supported
1819
ifeq ($(IOS_ARCH),armv7)
1920
LUAJIT_TARGET_FLAGS="-arch armv7 -isysroot $(IOS_SDK)"

contrib/src/openssl/rules.mak

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,16 @@ endif
4949
.openssl: openssl
5050
cd $< && $(HOSTVARS) ./Configure $(OPENSSL_CONFIG_VARS) --prefix=$(PREFIX) $(OPENSSL_COMPILER)
5151
ifdef HAVE_IOS
52-
# cd $< && perl -i -pe 's|static volatile sig_atomic_t intr_signal|static volatile int intr_signal|' crypto/ui/ui_openssl.c
5352
cd $< && perl -i -pe "s|^CC= xcrun clang|CC= xcrun cc -arch ${IOS_ARCH} -miphoneos-version-min=6.0 |g" Makefile
54-
cd $< && perl -i -pe "s|^CFLAG= (.*)|CFLAG= -isysroot ${IOS_SDK} |g" Makefile
53+
ifeq ($(BUILD_MODE),release)
54+
cd $< && perl -i -pe "s|^CFLAG= (.*)|CFLAG= -isysroot ${IOS_SDK} -O3 -DNDEBUG |g" Makefile
55+
endif
56+
ifeq ($(BUILD_MODE),debug)
57+
cd $< && perl -i -pe "s|^CFLAG= (.*)|CFLAG= -isysroot ${IOS_SDK} -O0 -g -DNDEBUG |g" Makefile
58+
endif
5559
endif
5660
ifdef HAVE_ANDROID
57-
cd $< && perl -i -pe "s|^CFLAG= (.*)|CFLAG= ${ANDROID_ARCH} |g" Makefile
61+
cd $< && perl -i -pe "s|^CFLAG= (.*)|CFLAG= ${ANDROID_ARCH} -O3 |g" Makefile
5862
endif
5963
cd $< && $(MAKE) install
6064
touch $@

0 commit comments

Comments
 (0)