Commit Graph

66 Commits

Author SHA1 Message Date
Wez Furlong
de7f624497 eden: cmake: fixup adding libgit2 options to target
Summary:
`target_link_libraries` only allows passing things that
are libraries and expressly forbids passing in `-framework Foo`,
which is the sort of thing we get back from pkg-config on macos.
The result of misusing this is that cmake would add `["-framework", "-lFoo"]`
to the argv for the linker, which is totally broken.

Instead, we should use `target_link_options`.

Unfortunately, cmake seems to fail to do the right thing with the
` -framework CoreFoundation -framework Security` flags returned
from libgit2 on my system even using `target_link_options`; it somehow
ends up with a bare `Security` and fails to link.  meh.

Reviewed By: strager

Differential Revision: D14680672

fbshipit-source-id: 62f65ddb4d07c8194cfc453cef1349b01be6c8b3
2019-03-29 15:02:04 -07:00
Wez Furlong
f8099e5129 eden: cmake fixup include directories and deps
Summary:
While testing out the new getdeps code I found that none
of the include directories from the probed libraries were being used.

The new getdeps installs each dep into its own prefix, whereas the
existing getdeps script installed them into the installation
prefix for eden itself.  That meant that they were being implicitly
found from a single include directory.

In addition to this, I encountered linker failures for the pretty
printers; the solution to those was to add appropriate deps for
the modules that depend upon the pretty printers.

Reviewed By: pkaush

Differential Revision: D14638758

fbshipit-source-id: a4c2b4c79603c268e1b1c707a05c3cb0e3f2757b
2019-03-28 20:57:17 -07:00
Zeyi Fan
21a6606e1f Add MononokeCurlBackingStore
Summary: This diff add a MononokeBackingStore implemented based on libcurl so we could add Mononoke support on macOS.

Reviewed By: chadaustin

Differential Revision: D14096313

fbshipit-source-id: 2bcb0c49002dcbb0a0190ba505a6e814e74db747
2019-03-11 14:34:08 -07:00
Matt Glazar
49f4c37b67 Add missing copyright notices
Summary: Internal Facebook infrastructure is nagging me about some files not having a Facebook copyright notice. Add a notice to these files to make the nagging stop.

Reviewed By: simpkins

Differential Revision: D14173944

fbshipit-source-id: 7234431224fcf4f86ea56ca2f9108f47ef959d87
2019-03-07 19:32:39 -08:00
Wez Furlong
63d868548f eden: reinstate treemanifest support on macos
Summary:
This got lost partly because the symlink/shipit bit
was a manual step when I did this first time around, and partly
because the mercurial code got refactored.

Restoring treemanifest restores `hg up` performance to saner
levels.

This is fairly straightforward, but now that we have !wez building this we've
found that my machine had lz4 installed in the default include path and that we
need to probe and find the correct one, so that is part of this diff also.

Reviewed By: simpkins

Differential Revision: D14078886

fbshipit-source-id: 971cd49757bbb7dcc484439e6d896698598a583b
2019-02-14 22:27:00 -08:00
Wez Furlong
1752348eef eden: wire up mac contbuild
Summary:
Make `build-oss.sh` actually run the cmake build.
At the moment this is only run from nbtd for mac platforms,
so that is all that I've tested with it.

This is similar to the the equivalent scripts for watchman.
In a later diff we can centralize and clean up the duplication.

Reviewed By: simpkins

Differential Revision: D13910031

fbshipit-source-id: 6a7250c22033e913d999cf928fed27dada0647ef
2019-02-05 21:52:30 -08:00
Wez Furlong
a545acbbd4 eden: add C datapack/treemanifest to cmake build
Summary:
This requires our mercurial repo to be available during
the build; I symlink it in alongside `common` in the `oss` dir,
and point it up to `scm/hg`.

This has partial support for mononoke too, but will need to add
logic to getdeps to pull down the proxygen repo and build that.

Reviewed By: simpkins

Differential Revision: D13480146

fbshipit-source-id: 54874245015af83a259f56944d2e5f87615baee7
2019-01-17 18:52:53 -08:00
Wez Furlong
d235a744ab eden: compiler settings tweaks for oss build
Summary:
There are some features of folly futures that are
currently being deprecated.  Until that codemod lands, deprecation
warnings have been disabled in the buck build.  To avoid
swamping the build output in the oss build, let's also turn
them off for cmake.

Reviewed By: strager

Differential Revision: D13686585

fbshipit-source-id: 14609a882bc78b7b31beb7ae02d762b9318e1312
2019-01-16 14:40:20 -08:00
Wez Furlong
98d551fe96 eden: pull in glog::glog in order to satisfy folly cmake deps
Summary:
This is necessary because the folly installed cmake config
advertises that it requires glog::glog but doesn't specify how to
find it.

See also D13482288

Reviewed By: simpkins

Differential Revision: D13486767

fbshipit-source-id: 0713ae70a1863fc23a5e86c21e8f72e3ba9e4ed2
2019-01-15 14:14:32 -08:00
Wez Furlong
1b5709f273 eden: fixup cmake defines for some optional features
Summary:
a couple of parts of the rust, datapack and mononoke code
didn't have appropriate definitions.

Allow `useDatapackGetBlob_` to be default initialized per its
definition in the header file rather than replicating the relatively
complex ifdef logic in the implementation.

Reviewed By: strager

Differential Revision: D13475710

fbshipit-source-id: d2955c9b22f1186f5897aa8bdbd9046b8f6b5f7a
2018-12-17 20:16:19 -08:00
Adam Simpkins
5d369296e8 cmake: compile with -std=gnu++1z
Summary:
Tell the compiler that we want to enable C++17 features.
This is required in order to use `std::is_default_constructible_v`, and it
prevents the compiler from warning about structured binding declarations.

Reviewed By: chadaustin, strager

Differential Revision: D10503904

fbshipit-source-id: 8fc521abdb261c787eabb3908bf7d4c2c8e46f2b
2018-10-23 13:42:12 -07:00
Adam Simpkins
1b4ecb3ed4 update the CMake based build with new dependencies
Summary:
Our CMake-based build had gotten somewhat out of date.  This fixes several
issues that were preventing it from building:
- wangle now depends on fizz, which in turn depends on libsodium
- fbthrift now depends on yarpl for the streaming functionality
- Eden now depends on libsqlite3
- The eden/fs/inode library now depends on eden/fs/config

Reviewed By: strager

Differential Revision: D10436531

fbshipit-source-id: f41065da2edb909e8eb94e03d0e62ae19ad3a84f
2018-10-23 13:42:12 -07:00
Matt Glazar
34eeb349ae Add opt-in for experimental systemd mode
Summary:
To ease the migration from the current custom daemon setup to a systemd-managed daemon, add a way to enable the to-be-implemented systemd behavior.

* To the edenfs daemon, support the --experimentalSystemd option.
* To the Eden CLI, support the EDEN_EXPERIMENTAL_SYSTEMD environment variable. When set, invoke the edenfs daemon with --experimentalSystemd.

Aside from adding a log message, this diff does not change any behavior. This diff just sets up scaffolding for future diffs.

Reviewed By: simpkins

Differential Revision: D10248055

fbshipit-source-id: 30ca5a4bfde00ff43fd6f2a5d0282ced4f177fed
2018-10-22 20:27:25 -07:00
Yedidya Feldblum
45b6f1e59f Rename generated client source file
Summary: [Thrift] Rename generated client source file for consistency with the recently-added header. The new generated client source file is `{Service}AsyncClient.cpp`.

Reviewed By: stevegury

Differential Revision: D9174822

fbshipit-source-id: 49a050a96d3f583fdb5ad56545ca4a16d31605d7
2018-08-07 17:22:13 -07:00
Jun Wu
fae2056037 do not require SELinux in GitHub build
Summary:
I tried to build eden using GitHub version and ran into SELinux issues.
This patch fixed related issues, namely:

- `set(X Y)` sets X to string literal Y. Change it to `set(X ${Y})`.
- `SELINUX_INCLUDE_DIR` could be undefined. Check before use it.
- `./eden/fs/eden-config.h` and `./build/eden/fs/eden-config.h` both exist and
  the former is used. Set include dirs so the latter gets used.

Reviewed By: bolinfest

Differential Revision: D9029272

fbshipit-source-id: 0c94bbe2f9e3fa90973802ddde16ad4d9ddfc0e8
2018-07-27 13:22:57 -07:00
Adam Simpkins
dea514bbef add CMake build files
Summary: Add CMakeFiles to build Eden.

Reviewed By: wez

Differential Revision: D7479587

fbshipit-source-id: 7e0b4a756005dadc3af5c13c36ce22d1dcc15071
2018-04-30 14:37:46 -07:00