using clang to build wxWidgets on Linux

365 views
Skip to first unread message

Alec Ross

unread,
Feb 26, 2013, 2:07:12 PM2/26/13
to wx-u...@googlegroups.com
I've just attempted to build wxWidgets w/ clang on Linux, using, from
the build directory

sudo CC=clang ../configure; sudo make

Looking at the console output from configure I could see that clang was
being accepted and used; and I _thought_ that I saw this too in the
first few lines from make. However make seemed to be mostly, if not
completely, compiling with command lines invoking g++.

So, some questions:

1) is there some simple and acceptable way to build using clang? (e.g.
repeat the setting of CC for the make command?)

2) The possibility that clang might build faster than g++ - specifically
for a Raspberry Pi Rasbian OS - was the motivation for this experiment.
(Tho' clang 3.0 is currently the latest available from the relevant
repos. I'd hope that later versions of clang would compile and build
faster.) Does anyone have any experience or thoughts on this?

3) And other advice/comments?

TIA,

Alec
--
Alec Ross

Vadim Zeitlin

unread,
Feb 28, 2013, 6:28:31 AM2/28/13
to wx-u...@googlegroups.com
On Tue, 26 Feb 2013 19:07:12 +0000 Alec Ross wrote:

AR> I've just attempted to build wxWidgets w/ clang on Linux, using, from
AR> the build directory
AR>
AR> sudo CC=clang ../configure; sudo make

You should set CXX to change C++ compiler, not [only] CC which is the C
compiler.

Also, you really shouldn't run neither configure nor make under sudo, who
knows what kind of horrible "rm -rf /"-like bugs there could be in our
build process.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Reply all
Reply to author
Forward
0 new messages