Cpp-library for arm and aarch64


(Scott Palmer) #1

It seems the cpp-library thinks that the only processor architecture in the world is Intel. How do we extend this to cross-compile for Arm? With the old cpp plugin I had something like this to add a tool-chain for Arm:

toolChains {
    gcc(Gcc) {
        target('x64') {
            compilerProbeArgs '-m64'
        }
        target('x86') {
            compilerProbeArgs '-m32', '-march=i686'
        }
    }
    clang(Clang) {
        target('x64') {
            compilerProbeArgs '-m64'
        }
    }
    gccArm(Gcc) {
        target('arm') {
            path "${ARM_GCC_TOOLS_DIR}/bin"
            cppCompiler.withArguments { args ->
                args << "-I${ARM_GCC_TOOLS_DIR}/include"
            }
        }
    }
    gccArm64(Gcc) {
        target('aarch64') {
            path "${ARM64_GCC_TOOLS_DIR}/bin" 
            cppCompiler.withArguments { args ->
                args << "-I${ARM64_GCC_TOOLS_DIR}/include"
            }
        }
    }
}

Is there a way to get the same behaviour with the new cpp-library plugin? If not yet, when?