Commit Graph

172 Commits (18cf899baf25f7cccf770a385e0a086c563a5b14)

Author SHA1 Message Date
Rick V 7136f77c2e
allow running lokinet as root on windows (#1347)
* - allow running lokinet as root on windows
  ($PROGRAMDATA/.lokinet/lokinet.ini)
- oops forgot to eat my own command line args

* cursed windows

* now that we eat our own startup options the entry in cxxopts is fully
ded

* aha our command line options get smashed up

* revert plus DRY fix
4 years ago
Rick V f283c565e7
make x.x.x.y+1 the default router on windows 4 years ago
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).
4 years ago
Rick V b4d6f89452
try extracting dns bind addr from INI on windows 4 years ago
Jason Rhinelander 4338e38cd6 Remove old vendored ghc-filesystem
We aren't using this anymore; this should have been deleted in the
switch to submodules.
4 years ago
Jason Rhinelander 3df4eaef2d Devendor cxxopts to submodule 4 years ago
Jason Rhinelander edbe0c7bf4 Devendor gtest to a submodule 4 years ago
Jason Rhinelander 5a787de73b Switch abseil & nlohmann to submodules and update to latest stable
Our current abseil won't build with gcc 10 (its `optional`
implementation appears broken), and spews warnings under slightly older
compilers; updating to the latest stable 2019 branch fixes both issues.
4 years ago
Ryan Tharp 4bea4867d0
Xenial compatibility
per https://github.com/loki-project/loki-network/blob/ubuntu/xenial/debian/patches/0004-Reduce-required-cmake-version.patch
5 years ago
Rick V 5d914cedd8
add definitions for System5 and generic non-Apple BSD 5 years ago
Jeff Becker b82bd93a88
use linux codepath for freebsd in filesystem.hpp 5 years ago
Jason Rhinelander 8d2c22fc72 Replace cppbackport with ghc-filesystem
From https://github.com/gulrak/filesystem which is more up-to-date and
looks better maintained than cppbackport.
5 years ago
Jeff Becker c1a81d26f1
pull in libsodium if local version sucks 5 years ago
Jeff Becker e1a4e77d5a
fix compile error on freebsd 5 years ago
jeff ff8c167362 make it compile on windows 5 years ago
Michael fadedb4a7b
Distinct ios build 5 years ago
Michael 1aec0dfa2b
Move logging to subdirectory 5 years ago
Rick V b3a975ff8e
sun fix
fix testing on sun
5 years ago
Michael 7d39f84ef3
Partial fixes for shadow 5 years ago
Michael 0ff3b1e707
Fix make install 5 years ago
Michael 8a8833d0fd
Bump version of cxxopts 5 years ago
Jeff 10d7e7cb77
Merge branch 'master' into master 5 years ago
Michael f9e9227e19
Fix gcc trunk warnings 5 years ago
Rick V 244af9891b
fix a crash on some win32 systems
make clang+libc2 happy
5 years ago
Rick V d4688ed3b3
get our TAP ifindex to pass to ipv6(1) on old platforms 5 years ago
Rick V 5b0b6e4ae2
fix header case
do not use Microsoft <filesystem>
add build stamp to version resource if we're doing local CI
5 years ago
Michael df498c7bf8
try to make some windows 5 years ago
Jeff Becker 909e0399d6
make android compile 5 years ago
Michael 42b951aa80
Try to link shared again 5 years ago
Michael 4806e52f62
Try to silence some warnings to reduce noise 5 years ago
Michael e52492911d
Refactor endpoint state management to a new class 5 years ago
Jeff Becker 9a2ffb85e6
Merge remote-tracking branch 'origin/master' into ipv6-tun 5 years ago
Jeff Becker 750397d085
use std::string instead of fs::path 5 years ago
Jeff Becker 1fd6b5ae74
Merge remote-tracking branch 'origin/master' into ipv6-tun 5 years ago
Michael 89eb1ded76
Add missing cppbackport fs::path constructor 5 years ago
Jeff Becker 134d36eb02
whitespace fix 5 years ago
Jeff Becker 4edb9d9b45
fix 5 years ago
Jeff Becker 58005c5f81
Merge remote-tracking branch 'origin/master' into ipv6-tun 5 years ago
Michael 661a8b6537
Fix macos build after rebase 5 years ago
Jeff ce034b3dff
make it work 5 years ago
Jeff Becker 6467d21ba0
* fix testnet codepath
* add packet info for osx
5 years ago
Jeff adcc866478 make it work 5 years ago
Jeff Becker 81cab62bb9
* fix testnet codepath
* add packet info for osx
5 years ago
Jeff Becker 04c9c61dfb
Merge remote-tracking branch 'origin/master' into ipv6-tun 5 years ago
Michael 59e8a7316f
Revert "Merge pull request #668 from michael-loki/remove_cppbackport"
This reverts commit 33142d5005, reversing
changes made to 408a652a01.
5 years ago
Jeff Becker a225759c0f
Merge remote-tracking branch 'origin/master' into ipv6-tun 5 years ago
Michael 1639c58cb6
Remove cppbackport from vendor dir 5 years ago
Jeff Becker 5c61df08b5
Merge remote-tracking branch 'origin/master' into ipv6-tun 5 years ago
Rick V a83402bc3a
finally fix solaris
Be more descriptive: strm_fd is the file handle used to link up
the STREAMS modules, while fd is the handle we use to read/write
user data from the network. -rick
5 years ago
Rick V a346f0d279
now i remember why i had to open /dev/tun twice on solaris
that _should_ fully close the TUN interface on Solaris
5 years ago