123 Commits

Author SHA1 Message Date
Frederich Munch
c29c79b9de Move CompilerOpts to use a bitfield for easier additions.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-18 15:44:17 +02:00
Frederich Munch
f80ca90232 Set -isysroot to an available SDK on OS X.
Previously cling was basically unusable on OS X unless the CommandLineTools were
installed. Now if XCode is installed the system headers from an SDK can be used.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-18 15:44:17 +02:00
Frederich Munch
d90972a879 Rename AddHostIncludes to AddHostArguments.
Move the addition of -resource-dir argument into the function.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-18 15:44:17 +02:00
Frederich Munch
38a74b7a23 Don't allocate a string for every argument in AddHostIncludes.
Use const char* for option and std::string for value.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-18 15:44:17 +02:00
Frederich Munch
4cdbc0461e Honor clangs -nostdinc++ and -nobuiltininc flags.
Rename AddHostCXXIncludes  to AddHostIncludes and delineate between -nostdinc++
and -nobuiltininc. When cling is invoked with -nobuiltininc, do not #include any runtime
files on startup.  Make ABI incompatability error consistent across platforms and add a test to verify behavior when this occurs.

More importantly this allow for easier debugging of Decl unloading as the amount of
declarations on startup is greatly reduced.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-18 15:44:17 +02:00
Frederich Munch
915935eb79 Fix possible crash and buffer overrun scanning arguments.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-18 15:44:16 +02:00
Frederich Munch
bbcf7651c3 Allow cling to find C++ headers for libc++ built with cling.
When built with libc++ try to use a version of clang that sits next to cling to determine
C++ header paths. Fallback to LLVM_CXX if no paths were added.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-18 15:44:16 +02:00
Frederich Munch
0f487d12af Check HostCXXI is empty rather than size() < 3.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-15 11:54:05 +02:00
Frederich Munch
eeb1e10e8b Don't add -nostdinc flag just because popen succeeded, make sure we got what we were looking for first.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-13 19:44:21 +02:00
Frederich Munch
109812d223 Fix crash from possible null return from getcwd. 2016-08-12 14:29:07 +02:00
Frederich Munch
bcb75e1476 Don't create a virtual file with a valid file name.
This fix allows running a file in the current working directory.
2016-08-12 14:29:07 +02:00
Frederich Munch
d7bc590e03 Don't invoke echo for stdin, read from /dev/null. OS X was intermittently hanging prior. 2016-08-12 13:44:05 +02:00
Frederich Munch
33c05d3105 Relocate PPOpts variable initialization and remove comment. 2016-08-12 13:44:05 +02:00
Bertrand Bellenot
4dcd5f599e Add Universal CRT or Windows 10 SDK in the include PATH.
This allows to run cling in a regular windows command prompt (instead of a Visual Studio Developer Command Prompt)
The issue was reported on the Forum: https://root.cern.ch/phpBB3/viewtopic.php?f=21&t=22006#p96749
2016-08-08 12:14:09 +02:00
Bertrand Bellenot
b0b2c6d9e7 Propagate the debug compiler flag to prevent mixing debug/optimized code on Windows 2016-07-21 11:44:26 +02:00
Axel Naumann
ab48904fa2 Revert "Clarify at compile-time that cling cannot handle the new GCC ABI yet."
Cling should now be able to do that.
2016-06-17 17:16:22 +02:00
Axel Naumann
cc29d8b4ec llvm-config.h gets installed and is sufficient. 2016-06-17 11:59:13 +02:00
Axel Naumann
92b021279c From Bertrand: fix for MSVC. 2016-06-15 14:14:34 +02:00
Axel Naumann
240d31859c Keep a valid include srcloc tree to make srclocs comparible. 2016-06-15 14:14:34 +02:00
Axel Naumann
d1941dbea6 Select PreprocessorOptions to load from PCH, instead of resetting their ref_cnt. 2016-06-15 14:14:33 +02:00
Axel Naumann
f844b88e5c llvm upgrade. 2016-06-15 14:14:33 +02:00
Pere Mato
1c1db3c3c9 Changed to avoid wanings when using Xcode >= 7.3 2016-03-24 11:59:43 +01:00
Paul Seyfert
8fe8f2f4ad disable grep colors, fixes ROOT-8056 2016-03-21 09:59:25 +01:00
Axel Naumann
4dd09de012 Missing include on Windows; fix preproc indentation. 2016-02-05 17:29:32 +01:00
Axel Naumann
a14f305911 Clarify at compile-time that cling cannot handle the new GCC ABI yet. 2016-02-04 20:29:06 +01:00
Axel Naumann
9c0d626cda Use -O as set through arguments. 2015-12-15 20:24:16 +01:00
Yves Le Maout
890e4b2e2a If -nostdinc++ was provided, do not determine standard library include paths. 2015-12-15 20:24:16 +01:00
Axel Naumann
30cc58a5c6 Reset diagnostics after parsing arguments: we shall issue an error but survive (ROOT-7619, ROOT-7614 and others). 2015-11-03 00:01:43 +01:00
Philippe Canal
8065dfa723 Support gcc 4.9.3's C++14-ish 2015-09-30 23:42:06 +02:00
Pere Mato
768254099f Enable C++14 in Cling when compiling with C++14 enabled 2015-08-17 18:45:02 +02:00
Pere Mato
5e5af173cf Forward the c++14 flag to building LLVM/CLING. Enable c++14 in the interpreter if compiled with -std=c++1y or -std=c++14. 2015-08-17 18:45:02 +02:00
Axel Naumann
2a73fc3b9e Grab lang, PP, target opts from PCH if it exists. 2015-08-17 18:45:02 +02:00
Axel Naumann
cfd091955e Pass pthread to CIFactory; enable it in LangOpts. 2015-06-23 21:30:17 +02:00
Axel Naumann
aa24ff9e20 Do not leak on error (Coverity). 2015-06-03 11:01:27 +02:00
Axel Naumann
5aa38ee07a Enable new GCC 5.1 ABI. 2015-05-08 01:06:49 +02:00
Axel Naumann
ea307f050c Factor out PP binary and target defines. 2015-05-08 01:06:49 +02:00
Philippe Canal
2fc94b3fa9 Remove code duplication 2015-04-17 02:50:36 +02:00
Philippe Canal
e216aea985 Add __CLING__clang__ and __CLING__GNUC__.
Those macros are define only in 'interpreted' code and respectively
only if cling itself was built with clang or gcc.
2015-04-16 08:44:51 +02:00
Bertrand Bellenot
9532d5481e Add missing include 2015-04-02 10:18:06 +02:00
Axel Naumann
c4a8f069d3 Register $PWD with its full name (ROOT-7114). 2015-03-25 20:03:28 +01:00
Axel Naumann
c431fc9d3e Make debug symbols optional (.debug). 2015-03-20 15:39:23 +01:00
Axel Naumann
ad16c82748 Enable debug info in CodeGenOptions. 2015-03-20 15:39:23 +01:00
Bertrand Bellenot
c2224aeff7 Enable asm parser in cling
Use PROJECT_SOURCE_DIR (full path to the root of the project source directory) instead of CMAKE_SOURCE_DIR (the directory from which cmake was started) in order to properly find AsmParser/CMakeLists.txt and call llvm::InitializeNativeTargetAsmParser();
2015-02-25 11:21:31 +01:00
Axel Naumann
276ff16454 No DeclCollector in interface; much more efficient OnlyLex path. 2015-02-11 10:57:46 +01:00
Axel Naumann
b59de8a40a Adapt to clang/llvm changes (mostly ownership). 2015-02-11 10:57:43 +01:00
Bertrand Bellenot
76d6fff7c9 Disable exceptions on Windows (until they are properly supported by clang) 2014-12-17 14:06:04 +01:00
Axel Naumann
73d7c51ea9 Fix clang / cling LangOpt discrepency on Linux. 2014-10-22 11:40:23 +02:00
Axel Naumann
71fc16baf4 Give cling the LangOpts clang has. 2014-10-21 20:09:02 +02:00
Axel Naumann
a17a1f35bc Move CheckABICompatibility() to IncrParser; move funcs into unnamed namespace.
The IncrParser has the ability to check the stdlib that the interpreter sees,
versus what the compiler sees. Of course what we want to check is the
interpreter's stdlib - including any -I passed at the prompt. The other
advantage of this change is that system headers are now pulled from the PCH
if it exists (ROOT-6794)
2014-10-14 09:08:06 +02:00
Axel Naumann
ad3f84987b -Xclang -x is insufficient; add -c - at the end (-x is position dependent). 2014-10-02 16:20:03 +02:00