Skip to content

Commit d7a03f8

Browse files
atsushienojonpryor
authored andcommitted
[monodroid] Fix COMMON_CFLAGS usage. (#82)
* Fix monodroid COMMON_CFLAGS usage and always build with RELEASE. The primary problem was that when app launches it tries to load assemblies: W/monodroid( 2061): Using override path: /data/data/com.xamarin.android.helloworld/files/.__override__ It should not happen, because we don't have fastdev here. However, it was weird, that the problem occured even with app Release builds. Turned out that in src/monodroid, Android.mk referenced COMMON_FLAGS, which did not exist. Fix typo. Then, since we don't have fastdev, monodroid needs to be built always in RELEASE mode. So, add -DRELEASE=1 even for Debug build. * Remove RELEASE build flag from common. Instead default xabuild to Release.
1 parent 40f2cbc commit d7a03f8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/monodroid/jni/Android.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ else
88
COMMON_CFLAGS ?= -g -O2 -DRELEASE=1
99
endif
1010

11-
LOCAL_CFLAGS = $(COMMON_FLAGS) \
11+
LOCAL_CFLAGS = $(COMMON_CFLAGS) \
1212
-std=c99 \
1313
-DHAVE_LINUX_NETLINK_H=1 -DHAVE_LINUX_RTNETLINK_H=1 \
1414
-D_REENTRANT -DPLATFORM_ANDROID -DANDROID -DLINUX -Dlinux -D__linux_ \

tools/scripts/xabuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ANDROID_SDK_PATH=$(echo $ANDROID_SDK_PATH | sed 's/^\w*//g')
1818
export ANDROID_NDK_PATH
1919
export ANDROID_SDK_PATH
2020

21-
exec xbuild $MSBUILD_OPTIONS \
21+
exec xbuild /p:Configuration=Release $MSBUILD_OPTIONS \
2222
/p:AndroidNdkDirectory="$ANDROID_NDK_PATH" \
2323
/p:AndroidSdkDirectory="$ANDROID_SDK_PATH" \
2424
/p:MonoDroidInstallDirectory="$MONO_ANDROID_PATH" \

0 commit comments

Comments
 (0)