Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Does anyone know how to get Embarcadero Clang to compile to assembly?


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Jan 18, 2016 8:58 AM Last Post By: Sune Andersen
Sune Andersen

Posts: 7
Registered: 9/13/01
Does anyone know how to get Embarcadero Clang to compile to assembly?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 3, 2016 11:24 AM
The real Clangs can easily be made to generate assembly from C++ with the -c -save-temps switches. Exchanging Clang.exe with bcc32c.exe in the command line that invoked Clang will also generate assembly, but it also gives a bunch of errors that shouldn't really be errors. Something associated with labels and function names. Compiling the same cpp file with bcc32c from within the IDE generate no errors, but -c or -save-temps as extra options to the compiler just generates errors.

So the question is: Does anyone know a way to get the Clang based compilers (bcc32c.exe and bcc64.exe) to generate AND keep assembly files when they are invoked from within the IDE?
Sune Andersen

Posts: 7
Registered: 9/13/01
Re: Does anyone know how to get Embarcadero Clang to compile to assembly?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 18, 2016 8:58 AM   in response to: Sune Andersen in response to: Sune Andersen
Sune Andersen wrote:
The real Clangs can easily be made to generate assembly from C++ with the -c -save-temps switches. Exchanging Clang.exe with bcc32c.exe in the command line that invoked Clang will also generate assembly, but it also gives a bunch of errors that shouldn't really be errors. Something associated with labels and function names. Compiling the same cpp file with bcc32c from within the IDE generate no errors, but -c or -save-temps as extra options to the compiler just generates errors.

So the question is: Does anyone know a way to get the Clang based compilers (bcc32c.exe and bcc64.exe) to generate AND keep assembly files when they are invoked from within the IDE?

Answering my own question:
1. Rightclick file you want to compile to assembly
2. Select Proprocess
3. Copy preprocessing command line, change -E to -S. Output file is specified after the -o switch, can be changed.
4. Run command.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02