Languages

Menu
Sites
Language
command-line build with LLVM 3.6

My native project is set to use LLVM 3.6 in Tizen Studio so I can use std::thread.  When I export a command-line project and build with

    tizen build-native -a arm -c llvm -C Debug

it uses LLVM 3.4 and fails (because that version does not support std::thread).

Is there a way to specify the compiler version when doing a command-line build?

Responses

2 Replies
Mango Bar

1: Firstly Check whether you have LLVM-3.6 Toolchain available or not using following command

mangobar@Mangobar-1404:~$ tizen build-native --help
-----------------------------------------------------
Starting build-native
-----------------------------------------------------

 -- working directory                  Specify where the base directory is for
                                        the command
 --arch (-a) x86 | arm                 Architecture for build result.
 --compiler (-c) gcc | llvm            Compiler for build result
                                        This option can be used with compiler
                                        version
                                         ex) gcc-version, llvm-version.
 --configuration (-C) Debug | Release  Configuration for build result.
 --help (-h)                           Show detailed explanation for given
                                        command
 --jobs (-j) the number of jobs        Specifies the number of parallel builds
                                        for the native app.
 --rootstrap (-r) rootstrap name       Rootstap name.

Supported compiler version
Toolchains:        GCC-4.6, GCC Platform, LLVM-3.4, GCC-4.9, LLVM-3.6, 
-----------------------------------------------------
Finished build-native

Total time: 00:00:00.06

if you don't have LLVM-3.6 you have to update toolchain from package-manager-cli.
 

2: If you have LLVM-3.6 in your available toolchain list, then mention llvm-3.6 with your build command as follows. 

mangobar@Mangobar~$ tizen build-native -a arm -c llvm-3.6 -- ~/cli-workspace/cliLlvm
-----------------------------------------------------
Starting build-native
-----------------------------------------------------

[ARCHITECTURE]: arm
[COMPILER]: llvm-3.6
There is no configuration input. -> Try to find default value from config file.
[CONFIGURATION]: Debug
"/home/armaan/cli/tools/smart-build-interface/bin/sbi_make" -v "Mobile 2.4" -a armel -t LLVM-3.6 -c Debug -p app
Checking prerequisite...
Checking make... ok
  Building directory: /home/armaan/cli-workspace/cliLlvm/Debug/objs
make: *** No rule to make target `/home/armaan/cli-workspace/cliLlvm/src/clillvm.c', needed by `/home/armaan/cli-workspace/cliLlvm/Debug/objs/src/clillvm.o'.  Stop.
PLATFORM_VER    : Mobile 2.4
ARCHITECTURE    : armel
TOOLCHAIN    : LLVM-3.6
BUILD_CONFIG    : Debug
PROJECT_TYPE    : app
PROJECT_PATH    : /home/armaan/cli-workspace/cliLlvm
SDK_PATH    : /home/armaan/cli
APPLICATION_ID    : org.example.clillvm
Info: Target has created. [mobile-2.4-device.core_llvm36.armel.core.app]
-----------------------------------------------------
Finished build-native

Total time: 00:00:00.239
Steven Merel

"tizen build-native --help" doesn't give me the output you showed above, but just goes ahead and tries to build (it seems to be ignoring the --help option).  I'm using version 1.3.5 of the command-line tool, according to "tizen version".

But... after updating to the latest version of Tizen Studio and build tools, it is now building with LLVM 3.6 as expected.

 

thanks!