1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-10 05:22:59 +03:00
Commit Graph

13 Commits

Author SHA1 Message Date
Chad Austin
4fb4756ec9 remove legacy __future__ imports
Summary: The future is now.

Reviewed By: xavierd

Differential Revision: D33714537

fbshipit-source-id: 8d282bbe7391c4b72b70dab54a5c252060fba457
2022-01-24 20:23:34 -08:00
Zsolt Dollenstein
40b6e08b08 Opt in opensource/fbcode_builder to pyfmt
Reviewed By: zertosh

Differential Revision: D29612107

fbshipit-source-id: ac450058134e23a3831db35d2e49c80eb8cde36a
2021-07-09 06:24:09 -07:00
Davide Cavalca
8004d46cfc proxygen: fix shared libs build
Summary:
Right now proxygen hardcodes a static build when using cmake  and
ignores BUILD_SHARED_LIBS. Fix that, and enable PIE on the shared libs so they
can be linked properly

Closes: https://github.com/facebook/proxygen/issues/335

Reviewed By: mjoras, lnicco

Differential Revision: D24787944

fbshipit-source-id: 7a654af7cb43227ca913a1bed67f2432703a343d
2020-11-10 14:24:32 -08:00
Luca Niccolini
d54f4ddff6 fizz, mvfst, wangle, proxygen: add gmock as fbcode_build dependency
Summary: they were all transitively pulling it from folly

Reviewed By: mjoras

Differential Revision: D23683292

fbshipit-source-id: 2085a580584891b3fd0960c14505c0f675a11bd5
2020-09-14 22:05:03 -07:00
Victor Zverovich
da70fce0d3 Replace Folly Format with fmt in logger to reduce binary size
Summary:
Now that fmt is available in Folly builds (D14813810), use it to reduce binary code size in Folly Logger. This is done by moving most of the formatting logic behind the type-erased `vformat` API. Previously it was instantiated for all combinations of formatting argument types used in calls to `FB_LOGF` and `XLOGF` in a program.

The effect of this change can be illustrated by looking at symbol sizes as given by `nm -S -td` for the following test function:

```
void test_log() {
  FB_LOGF(logger, WARN, "num events: {:06d}, duration: {:6.3f}", 1234, 5.6789);
}
```
compiled in `opt` mode.

`nm` before:

```
0000000004236736 0000000000000231 T test_log()
0000000004236992 0000000000001002 W std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > folly::LogStreamProcessor::formatLogString<int, double>(folly::Range<char const*>, int const&, double const&)
```

`nm` after:

```
0000000004237536 0000000000000231 T test_log()
0000000004237792 0000000000000251 W std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > folly::LogStreamProcessor::formatLogString<int, double>(folly::Range<char const*>, int const&, double const&)
0000000004238048 0000000000000740 W folly::LogStreamProcessor::vformatLogString[abi:cxx11](folly::Range<char const*>, fmt::v5::format_args, bool&)
```

Before we had one 1002 byte instantiation of `formatLogString<int, double>`. With this change it was reduced 4x to 251 bytes and non-template function `vformatLogString` was added which is shared among all logging calls. The size of `test_log` remained unchanged. There are even bigger savings from Folly Formatter instantiations which are no longer needed, e.g.

```
0000000004238032 0000000000001363 W _ZNK5folly13BaseFormatterINS_9FormatterILb0EJRKiRKdEEELb0EJS3_S5_EEclIZNKS7_8appendToINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENSt9enable_ifIXsr12IsSomeStringIT_EE5valueEvE4typeERSH_EUlNS_5RangeIPKcEEE_EEvSK_
```

So in total this change results in ~5x per-call/instantiation binary size. It is possible to reduce binary size even further but it is not done in the current diff to keep it manageable.

In addition to binary size improvements, switching to fmt will potentially

* allow catching errors in format strings at compile time,
* simplify future migration to C++20 [`std::format`](http://eel.is/c++draft/format).

Reviewed By: simpkins

Differential Revision: D15485589

fbshipit-source-id: 06db4436839f11c2c3dbed7b36658e2193343411
2019-11-18 05:52:41 -08:00
Alexey Spiridonov
5b96cf2eb0 Revert / fix up D17158685
Summary:
Proxygen no longer uses `fbcode_builder` to run its tests, so whatever the purpose of D17158685, these `fbcode_builder` configs no longer affect Proxygen, and can be reverted to their original state.

Since the general design pattern for `fbcode_builder` has been to link everything as `.so`s, let's return to this (which helps fix Bistro's build).

Also, let's not waste time building & linking tests for libraries that are not the library under test. That is:
 - Before: The Bistro build also builds tests for wangle, proxygen, etc. This is a result of some accidental changes in D17158685.
 - After: We explicitly don't build test for any of the 4 dependencies here. This is OK because each project also has its own `fbcode_builder_config.py`, which **does** build tests.

This latter part should result in a build-time reduction.

Reviewed By: lnicco

Differential Revision: D17819858

fbshipit-source-id: 7cad1bed86b2f0c3934b0fc5d6fb33e6a2ee2695
2019-10-08 21:48:31 -07:00
Luca Niccolini
26d4e9a597 BUILD_SHARED_LIBS=OFF for CI build
Summary: fixes the CI build

Reviewed By: dddmello

Differential Revision: D17158685

fbshipit-source-id: 44ea871eab4d8c964b8372fb8d84879fa823ca50
2019-09-03 09:33:20 -07:00
Luca Niccolini
e31fdbc069 Deprecate autoconf
Summary:
Remove all the autoconf files.
And fully switch to the cmake build

Reviewed By: udippant

Differential Revision: D16066986

fbshipit-source-id: 9e3082dded77ce85449cf5a3a03bed31c16b711f
2019-07-02 01:35:57 -07:00
Luca Niccolini
d373a9d5b9 Back out "[proxygen][oss] enable CMake build (with HTTP/3)"
Summary: Original commit changeset: 5e101fc38417

Reviewed By: snarkmaster

Differential Revision: D15726457

fbshipit-source-id: 001ee9ebaee81ebc60996e5fb95c1870121b2dec
2019-06-09 15:25:14 -07:00
Luca Niccolini
7772a4cbff enable CMake build (with HTTP/3)
Reviewed By: udippant

Differential Revision: D15368849

fbshipit-source-id: 5e101fc38417b807a531fa456b38234d6dd08b7a
2019-05-19 19:17:16 -07:00
Yunus Rahbar
e3b1c3b50d Add copyright headers to fbcode builder source files
Reviewed By: simpkins

Differential Revision: D12990230

fbshipit-source-id: 58d82299a8fe6aed75115008fe5dfb0f46d847c6
2018-11-09 09:52:15 -08:00
Ajanthan Asogamoorthy
ca444e534d Link in fizz to wangle and wangle's dependencies
Summary: Update cmake configurations + legocastle jobs in order to add fizz as a dependency to wangle

Reviewed By: reanimus

Differential Revision: D9337956

fbshipit-source-id: 40f25694c2b3fd8aa37d254bc63a664f4c8ee526
2018-08-22 13:14:19 -07:00
lesha
64dc78b3c3 Re-synchronize with fb-internal repository
Summary: We just changed the ShipIt rules, which requires this manual commit. There were also a couple of files that got out-of-sync a long time ago. Fix that.
2017-02-09 13:06:28 -08:00