1

Currently, I am using the command:

clang++ -o hello.exe hello.cpp 

Is there any way to set the target platform, for example if I wanted to build targeting x86 or ARM on my x64 computer. In visual studio, you can easily set this under configurations. I am using clang front end and LLVM back end.

3

1 Answer 1

0

According to clang --help:

--target=<value> Generate code for the given target 

In order to check which targets are available with your distribution of clang:

clang -print-targets 

So for example, you can do:

clang++ --target=arm64 -o hello.exe hello.cpp 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.