Commit Graph

47 Commits

Author SHA1 Message Date
Riatre Foo
9362b4539f Fix symlink creation on Windows. 2017-12-23 11:16:48 -08:00
Riatre Foo
1056869ffa Remove dependency on builtin clang_resource_dir. 2017-12-23 11:16:44 -08:00
Fangrui Song
ca02ee4339 [waf] Support --bundled-clang=5.0.1 2017-12-21 18:52:16 -08:00
Fangrui Song
1dfa88ed1c Update third_party dependencies to FreeBSD buildable versions
The latest sparsepp and loguru build on FreeBSD:

605ebb9534
c3f5b43206
2017-12-19 20:24:41 -08:00
Fangrui Song
0cf54f3557 [waf] Fix ./waf configure --bundled-clang=5.0.0 2017-12-18 13:30:57 -08:00
Joel Hock
934c20312a set rpath for mac when --use-system-clang 2017-12-17 21:18:38 -08:00
Fangrui Song
2fb135e10a Support FreeBSD
This commit fixes issue on cquery's side. Its dependencies loguru and
sparsepp should also be ported to FreeBSD:

* https://github.com/emilk/loguru/pull/46
* sysinfo(2) called by sparsepp https://github.com/greg7mdp/sparsepp/blob/master/sparsepp/spp_memory.h#L32
2017-12-17 16:44:21 -08:00
Riatre Foo
0045e4817c Windows build script (#154)
* Cast from float explicitly.

* Upgrades to waf 2.0.2.

For VS2017 support on Windows.

* [waf] Supports building on Windows.

Needs 7z.exe in PATH for extracting prebuilt clang NSIS installer (when
using bundled clang).
RPATH is "emulated" by putting a libclang.dll alongside the cquery
binary.
Tested with Visual Studio 2017 toolchain.

* [waf] Fix default_resource_directory on Windows + system clang.

* Add AppVeyor configuration
2017-12-17 10:14:30 -08:00
Fangrui Song
0a8ea0e51f Honor environment variable CXXFLAGS and tweak README (#153)
Also loosen rsync `-a` option to `-rt`
2017-12-16 19:39:51 -08:00
DaanDeMeyer
97da6c937a Remove sparsehash from wscript 2017-12-16 09:39:36 -08:00
Fangrui Song
ea5c89e956 [waf] Use {str,bytes}.decode to make it compatible with Python 2/3 2017-12-14 21:35:25 -08:00
Fangrui Song
044ef0b309 [waf] Install resource dir to $PREFIX (#139) 2017-12-14 17:45:15 -08:00
Chen
f3f7bc26cd Better default resource dir heuristics: use system resource dir with system clang and relative path to resource dir with bundled clang (#137) 2017-12-14 14:35:21 -08:00
Fangrui Song
d8b47ebdd4 [waf] Use RPATH $ORIGIN on FreeBSD/Linux and copy libclang.so.[4-9] to $PREFIX/lib/clang+llvm*/lib/ (#133)
Also copy build/release/lib/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/lib/clang/5.0.0/include/* to $PREFIX/lib/clang+llvm*/resource-dir/include/
2017-12-13 10:53:42 -08:00
Fangrui Song
cb633541e2 Change default path of built executable from build/app to build/release/bin/cquery (installed to $PREFIX/bin/cquery)
This is incompatible, please change your editor configuration:

* LanguageClient-neovim: g:LanguageClient_serverCommands
* Emacs cquery.el: cquery-executable
* VSCode: cquery.launch.workingDirectory cquery.launch.command
2017-12-12 00:07:38 -08:00
Fangrui Song
60febe6e9d [waf] Add --variant={debug,release} (#129)
./waf build => build/app
./waf build --variant=debug => build/debug/app
./waf build --variant=release => build/release/app

TODO Make --variant default to 'release', rename `app` to `bin/cquery`, and disallow empty variant
2017-12-11 20:36:53 -08:00
Jacob Dufault
07c0ae109e Fix waf build 2017-12-05 00:05:08 -08:00
Fangrui Song
3ca2d0f2ad waf configure --bundled-clang=5.0.0 to use prebuilt clang+llvm 5.0.0, fixes #41 2017-11-29 11:12:45 -08:00
Jacob Dufault
7923b5d219 Revert "Upgrade bundled clang+llvm to 5.0.0, fixes #41"
This reverts commit 162c4e8198bbae2a1ef52b764a365d7b92b8f81e.
2017-11-27 08:40:06 -08:00
Fangrui Song
7df44f75a7 Upgrade bundled clang+llvm to 5.0.0, fixes #41 2017-11-27 11:13:32 -05:00
Fangrui Song
8aaffb7031 Set rpath if not --use_system_clang 2017-11-26 15:15:05 -05:00
xbreak
972a6359da Added waf options to use clang from system (fixes #36): (#64)
- `--use-system-clang` enables use of system clang.
 - `--llvm-config=LLVM_CONFIG` specifies which llvm-config to use.
 - `--clang-prefix=CLANG_PREFIX` specifies the clang prefix to use as
   a fallback if llvm-config is not available.
2017-11-26 12:13:43 -05:00
Fangrui Song
7d06ff212f Use -Wno-sign-compare to make recent GCC happy 2017-11-22 10:42:04 -05:00
DaanDeMeyer
030e63f15c Remove whitespace before shebang in wscript
This makes the python extension in vscode recognize it as a python file
2017-11-20 17:14:24 -05:00
Daan De Meyer
424c7b69db Fix wscript to support both Python 2 and Python 3. 2017-11-19 13:03:40 -05:00
Jacob Dufault
544818bdd4 waf: Only compile cc files in src/ 2017-11-18 09:27:09 -08:00
Jacob Dufault
c5651a1dbf Revert to clang4 2017-09-25 14:32:45 -07:00
Jacob Dufault
104cfd167c Fix linux build 2017-09-13 10:53:13 -07:00
Jacob Dufault
9336143333 Update to libclang 5.0.0 2017-09-12 22:29:49 -07:00
Jacob Dufault
e771f05f3f Linux build fixes 2017-07-29 21:46:21 -07:00
James Cook
5b4986f04b Fix compiler warnings and turn on warnings as errors 2017-06-19 18:30:44 -07:00
Jacob Dufault
53efee70e4 Only build files under src/ 2017-06-07 18:09:41 -07:00
Jacob Dufault
640ce7bd85 Some WIP changes on wscript to download libcxx 2017-05-13 14:35:02 -07:00
Jacob Dufault
e13d161c62 Experimental support for emitting compile_commands.json from waf 2017-04-25 19:57:36 -07:00
Jacob Dufault
bc838822a5 Fix compile under waf and pass modified settings to extension 2017-04-19 10:06:39 -07:00
Jacob Dufault
8f1e517c0a Small tweaks 2017-04-14 15:30:33 -07:00
Jacob Dufault
f158f759b1 more portable wscript 2017-04-11 09:57:51 -07:00
Jacob Dufault
22cc140d80 use sparsehash 2017-04-07 18:35:12 -07:00
Jacob Dufault
2a3ee89349 wip 2017-03-29 10:12:00 -07:00
Jacob Dufault
9ac960109f wip 2017-03-27 19:35:27 -07:00
Jacob Dufault
a8a343420b misc-linux-fixes 2017-03-27 18:04:37 -07:00
Jacob Dufault
539c779606 fix some warnings 2017-03-24 17:40:01 -07:00
Jacob Dufault
b7c9f55e51 easy building on linux/mac 2017-03-16 19:56:23 -07:00
Jacob Dufault
82d6249358 rpath 2017-03-16 18:40:01 -07:00
Jacob Dufault
2a08552265 linux platform WIP 2017-03-03 17:45:20 -08:00
Jacob Dufault
18aa28bdea building 2017-02-26 18:03:14 -08:00
Jacob Dufault
bc8daee065 initial build system 2017-02-26 14:59:22 -08:00