PDA

View Full Version : Glang++ output in assembly (.s)



chandras002
17th May 2018, 17:07
Dear Qt friends,

I am using Qt creator 4.0.3 Based on Qt 5.6.1 (Clang 7.0 64 bit) on MacOS (High Sierra).

Objective: get the assembly listing of executable (simple GUI app) in .S file. I have tried in Linux able to get.
Able to build the app from command line using Clang++ but getting linker error
the app test5 has 3 files -- > main.0, mainwindow.O moc_mainwindow.O (after Qmake, make )

Following Code - from command line creates executable (same as Qtcreator compile output)


clang++ -headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.7 -Wl,-rpath,/Users/itadmin/Qt5.6.3/5.6.3/clang_64/lib -o test5.app main.o mainwindow.o moc_mainwindow.o -F/Users/itadmin/Qt5.6.3/5.6.3/clang_64/lib -framework QtWidgets -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL


In the above command : ....../clang_64/lib -o test5.app main.o mainwindow.o moc_mainwindow.o -F /Users/itadmin.....
I trying with option for assembly -/clang_64/lib -S -o test5.s main.o mainwindow.o moc_mainwindow.o [/B] -F /Users/itadmin.....
but getting many 'linker' input unused [-Wunused-command-line-argument] error. :rolleyes:

Am I missing something? It is possible to use Glang++ to get .s like GCC in Linux?

With Thanks & Cheers!
chandra