Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg] [Android]Compile armv6 with arm mode #17962

Merged
merged 2 commits into from
Jun 7, 2021

Conversation

talregev
Copy link
Contributor

@talregev talregev commented May 16, 2021

Compile armv6 with arm mode

@talregev talregev changed the title Compile amrv6 with arm mode [Android]Compile amrv6 with arm mode May 16, 2021
@talregev talregev changed the title [Android]Compile amrv6 with arm mode [Android]Compile armv6 with arm mode May 17, 2021
@PhoebeHui PhoebeHui self-assigned this May 18, 2021
@PhoebeHui PhoebeHui changed the title [Android]Compile armv6 with arm mode [vcpkg] [Android]Compile armv6 with arm mode May 18, 2021
@PhoebeHui PhoebeHui added the category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed label May 18, 2021
@PhoebeHui PhoebeHui requested a review from dan-shaw May 19, 2021 07:11
@PhoebeHui
Copy link
Contributor

@dan-shaw, could you help further review?

@PhoebeHui PhoebeHui requested a review from ras0219-msft May 19, 2021 07:13
@talregev
Copy link
Contributor Author

talregev commented May 19, 2021

I change this setting because when I compile and run with default armeabi setting, curl amrv6 iget exception on runtime.
from android.toolchain.cmake file on the ndk 15c:

if(ANDROID_ABI MATCHES "armeabi")
	if(ANDROID_ARM_MODE STREQUAL thumb)
		list(APPEND ANDROID_COMPILER_FLAGS
			-mthumb)
	elseif(ANDROID_ARM_MODE STREQUAL arm)
		list(APPEND ANDROID_COMPILER_FLAGS
			-marm)
	else()			

The default is thumb and it cause exception on run time when running curl command.

if(NOT ANDROID_ARM_MODE)
	set(ANDROID_ARM_MODE thumb)
endif()

@talregev
Copy link
Contributor Author

I will close this PR, because arm mode is good for our project, maybe for other project it not good:
https://stackoverflow.com/questions/10638130/what-is-the-arm-thumb-instruction-set
https://stackoverflow.com/questions/25720012/native-components-armeabi-v7a-and-thumb

I will not delete this PR, because to let other people know about this for their android ndk armeabi project.

@talregev talregev closed this May 22, 2021
@talregev talregev reopened this May 26, 2021
@talregev
Copy link
Contributor Author

I was thinking to re-open this PR
I think it better to use arm mode then thumb mode,
Because even I try to compile all the client in our open source with thumb flag, I still get an exception in run time when call curl method.

When everything is compile with arm mode it don't happen.

@talregev
Copy link
Contributor Author

@PhoebeHui @dan-shaw

@PhoebeHui PhoebeHui requested review from strega-nil-ms and removed request for dan-shaw May 26, 2021 08:22
@PhoebeHui
Copy link
Contributor

@strega-nil-ms, could you help further review?

@strega-nil-ms strega-nil-ms merged commit b8dbf43 into microsoft:master Jun 7, 2021
@strega-nil-ms
Copy link
Contributor

Thanks @talregev :)

@talregev talregev deleted the patch-3 branch March 26, 2022 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants