Commit Graph

175 Commits

Author SHA1 Message Date
Jeff
686b13b2f3 fix up cmake lokimq target 2020-09-19 09:50:54 -04:00
Jason Rhinelander
f5e5066bd5
Update deps (#1348)
* Update submodules/static deps to latest versions

* Add mingw zmq build patch

* Drop support for Windows 2000
2020-09-16 15:47:35 -04:00
Jeff
dfd8df5e7f
add uninstall target (#1340)
* add uninstall target

* * redo cmake uninstall
* remove lokinet-vpn python script
* don't install lokinet-vpn twice
2020-09-09 12:06:57 -04:00
Jeff Becker
d70e11feba
change what patches are applied 2020-08-25 09:44:12 -04:00
Jeff Becker
ab568b27d0
bump windows version for CI until patches are updated 2020-08-25 08:51:55 -04:00
Jeff Becker
fc75da174e
disable second path for now until it works 2020-08-25 08:36:26 -04:00
Rick V
5c34665fce
move win32 lokimq patch 2020-08-10 13:51:48 -05:00
Jeff Becker
4bb214eba0
attempt fix for libunbound on win32
* run unbound stuff in another thread because LOL windows
* because unbound runs in another thread callbacks for libunbound need to be wrapped in a deferred call so they are done in the logic thread
* bump sqlite3 dep because it's gone, repin hash.
2020-08-04 10:53:32 -04:00
Jason Rhinelander
2b2c41fdf6
Fix sqlite3 external target name 2020-07-02 10:22:07 -06:00
Stephen Shelton
eb9a862f51
Sqlite3 deps for Windows / static targets 2020-07-02 10:22:06 -06:00
Stephen Shelton
6e1a23cdc7
Use pkg_check_modules instead of find_package for sqlite3 2020-07-02 10:22:05 -06:00
Stephen Shelton
4aa6f8e2df
Use find_package() for sqlite3 2020-07-02 10:22:04 -06:00
Jeff Becker
8772c05a13
revert download libsodium target name change 2020-07-02 11:13:31 -04:00
Jeff Becker
2737cd6f98
remove FindSodium.cmake and use the cmake incantations from loki-core for setting sodium target up 2020-07-02 11:13:31 -04:00
Jeff Becker
c6bd0afe96
move sodium cmake target about so that it is detected earlier 2020-07-02 11:13:31 -04:00
Jeff Becker
9f7ac7a9a3
apply patch 2020-07-02 11:13:31 -04:00
Jeff Becker
c2f9c46686
zmq requires win xp or higher. 2020-07-02 11:13:30 -04:00
Jeff Becker
fc08f92425
move lokimq cmake code 2020-07-02 11:10:06 -04:00
Jeff Becker
e13e886df9
fix up event loop crap so that unit tests pass 2020-07-02 11:10:06 -04:00
Jeff Becker
970cdf212b
fix up cmake cruft 2020-07-02 11:07:33 -04:00
Jeff Becker
7003eda305
add FindLokiMQ.cmake for finding lokimq package 2020-07-02 11:07:32 -04:00
Jeff Becker
31304dbd9f
fix up cmake cruft 2020-07-02 11:07:31 -04:00
Jeff Becker
520e472bcd
add FindLokiMQ.cmake for finding lokimq package 2020-07-02 11:07:31 -04:00
Jeff Becker
ad882d0d70
initial working code 2020-07-02 11:07:31 -04:00
Jeff Becker
0006751d80
initial wack at lokimq 2020-07-02 11:07:31 -04:00
Jeff Becker
a9de1ad277
fix typo 2020-06-17 11:09:22 -04:00
Jeff Becker
c66e925fb2
add more cmake incantations for windows cross compile 2020-06-17 11:06:12 -04:00
Jeff Becker
fdfdd2a1d2
turn off lto, add patches 2020-06-17 10:37:41 -04:00
Jeff Becker
db3d43a513
fix typo 2020-06-17 10:23:41 -04:00
Jeff Becker
26a2f54b0b
set ar and ranlib on openssl cross compile to appease the cmake god 2020-06-17 10:20:14 -04:00
Jason Rhinelander
cdd57ac09b fix unbound ssl linking 2020-06-16 21:18:13 -03:00
Thomas Winget
0ecdf60777 static build fixes in cmake stuff
I hate cmake so much.
2020-06-16 18:52:20 -04:00
Linux User
e6bcbf47b4
patch libsodium for windows the cmake way 2020-06-12 15:19:11 -05:00
Rick V
adf253e800
picflags differ slightly on native vs wow64 builds 2020-06-12 15:19:10 -05:00
Rick V
45890133bc
LIBUV_ROOT override for win32
emit PIC code (.reloc) on win32 for aslr
2020-06-12 15:18:57 -05:00
Jason Rhinelander
83fc7de237 Get processor count properly 2020-06-10 14:53:57 -03:00
Jeff Becker
fbb7c0d6f9
add forgotten file 2020-05-23 16:07:20 -04:00
Jeff Becker
6af498092b
exit traffic via loki addresses 2020-05-23 16:07:19 -04:00
Jason Rhinelander
a484ccffc2 static curl build fixes
- fix ldap disabling flag
- disable a ton of protocols (include ldap, properly)
- remove INSTALL_COMMAND (the default seems to work fine)
- disable --quiet so we can see the configuration summary
2020-05-23 14:02:04 -03:00
Jason Rhinelander
7d5a99d820
Merge pull request #1284 from majestrate/toggle-lto-2020-05-20
add WITH_LTO option to disble lto on compile time
2020-05-20 20:45:36 -03:00
Jeff Becker
a6d17dcd16
add WITH_LTO option to disble lto on compile time 2020-05-20 19:29:49 -04:00
Jason Rhinelander
ebd2142114 Don't use std::optional::value() because f u macos
This replaces all use of std::optional's `opt.value()` with `*opt`
because macOS is great and the ghost of Steve Jobs says that actually
supporting std::optional's value() method is not for chumps before macOS
10.14.  So don't use it because Apple is great.

Pretty much all of our use of it actually is done better with operator*
anyway (since operator* doesn't do a check that the optional has a
value).

Also replaced *most* of the `has_value()` calls with direct bool
context, except for one in the config section which looked really
confusing at a glance without a has_value().
2020-05-20 19:18:28 -03:00
Jason Rhinelander
be9ddf2ae1 Bring back ghc::filesystem for broke AF macos
macOS doesn't provide `<filesystem>` support when targetting anything
earlier than 10.15.
2020-05-20 19:18:27 -03:00
Jason Rhinelander
b4fce0e3ee curl: use ccache; disabled lots of other crap
brotli and libpsl both got autodetected on my system, so explicitly
disable them (and a bunch of other crap from --configure).

Build with ccache.
2020-05-17 23:31:41 -03:00
Jason Rhinelander
fa794e64cd Build libsodium with ccache and fPIC
fPIC is needed in case we are building a shared liblokinet (within which
we want the static libsodium).
2020-05-17 23:31:41 -03:00
Jason Rhinelander
c5faa86926 cmake refactor
Refactors many things in cmake to improve and simplify:

- don't use variable indirection for target names; target names are
*already* a variable of sorts.  (e.g. ${UTIL_LIB} is now just
lokinet-util).  cmake/basic_definitions.cmake is now gone.

- fix LTO enabling to use the standard cmake (3.9+) LTO mechanism rather
than shoving a bunch of flag hacks through link_libraries and
add_compile_options.  This also now enables LTO when building a shared
library (because previously the -flto hacks were only turned on in the
static code for some reason).

- build liblokinet as *either* shared library or static library, but not
both.  Building both makes things more complicated because they had
different names (lokinet-shared or lokinet-static) and seems pointless:
you generally want one or the other.  Now there is just the liblokinet
target, which will be shared or static depending on the value of
BUILD_SHARED_LIBS.

- Simplify lokinet-cryptography AVX2 code: just build *one* library, and
add in the additional AVX2 files when possible, rather than building two
and needing to merge them.

- Compress STATIC_LINK and STATIC_LINK_RUNTIME into just STATIC_LINK.
It makes no sense to use one of these (_RUNTIME) on Windows and the
other on non-Windows when they appear to try to do the same thing.

- remove a bunch of annotations from `endif(FOO)` -> `endif()`.

- move all the tuntap compilation code (including OS-specific source
file selection) into vendor/CMakeLists.txt and build tuntap as an
intermediate OBJECT library rather than keeping a global variable in 5
different files.

- move release motto define to root cmake; it made no sense being
duplicated in both unix.cmake and win32.cmake

- fix add_log_tag to not stomp on any existing source compile flags with
its definition.  Also use proper compile definition property instead of
cramming it into compile flags.

- make optimization/linker flags less hacky.  There's no reason for us
to force particular optimization flags because the cmake build type
already does that (e.g. -DCMAKE_BUILD_TYPE=Release does -O3).  Not doing
that also silences a bunch of cmake warnings because it thinks "-O0 -g3"
etc.  are link libraries (which is reasonable: that's what the code was
telling cmake they are).

- sets the default build type to RelWithDebInfo which gives us `-O2 -g`
if you don't specify a build type.

- Move PIC up (so that the things loaded in unix.cmake, notably libuv,
have it set).

- Add a custom `curl` interface library that carries the correct link
target and include paths for curl (system or bundled).
2020-05-17 23:31:23 -03:00
Jeff Becker
64157d5d44 track libcurl and libuv with cmake, add libuv submodule 2020-05-17 14:53:28 -03:00
Jeff Becker
abc1f67430
check for std::optional as macos can be broke af sometimes 2020-05-15 09:40:24 -04:00
Jeff Becker
5a24d2deef
add check for std::filesystem 2020-05-15 09:32:24 -04:00
cathugger
0bb43d98c7
fix GenVersion.cmake
* rev-parse --short without any argument defaults to 8 chars
* truncation is absolutely moot here
* rev-list --abbrev-commit also uses 8 chars by default

because of length mismatch (COMMIT - 9 chars, TAGGEDCOMMIT - 8 chars) it always was mismatching them even when it should've been detecting that it's at release tag.
cut out explicit lengths and leave everything to use defaults, because they work (they both rely on the same core.abbrev setting so no length mismatch should happen).
2020-05-06 14:26:15 +00:00