-
Notifications
You must be signed in to change notification settings - Fork 11
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
cpp-library plugin needs suport for cross-compiling for Arm #989
Comments
+1 . Does anyone have a workaround? |
+1 Also need this. All our current builds use the component model and cross compile for arm. We'd like to start migrating to the new plugins. For anyone who is interested, I was able to compile a hello world program for arm using the new Gradle #Dockerfile: FROM ubuntu:bionic ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -qq -y #build.gradle plugins { application {
} |
My workaround is to use the old "cpp" plugin from Gradle 4 instead of "cpp-library". It's routine to define new platforms in the "cpp" plugin, whereas "cpp-library" seems to be limited to 6 hardcoded ones. Also note that the Android plugins handle ARM architectures, so it's surprising that "cpp-library" can't! |
This is how I do it based on many helpful hints from @lacasseio and others: https://github.com/pedrolamarao/psys/blob/master/buildSrc/src/main/groovy/toolchain.groovy |
@pedrolamarao It looks like that is using a different plugin 'dev.nokee.cpp-library' not 'cpp-library' |
The older c and cpp plugins could be configured with custom tool chains to support building for linux-arm on linux x86_64. The new preferred cpp-library needs this ability.
Expected Behavior
I should be able to add target machines such as:
A new mechanism is needed to define a new machine type or specify the tool chain for a type.
Current Behavior
We can't cross-compile for Arm currently
Context
I want to avoid the old c and cpp plugins (which are very complicated to configure) and adopt the new cpp-library plugin, but I have existing code and future needs to build the same project on Linux, Windows and macOS, both 32- and 64-bit for Linux and windows in addition to 32 and 64-bit Arm for Linux.
I am building for an application framework that uses the same source code for desktops and embedded devices.
Your Environment
Windows 10 64-bit Intel
Linux (Ubuntu/CentOS) 64-bit Intel, targeting both Intel and Arm
macOS
The text was updated successfully, but these errors were encountered: