Commit 946e907c authored by Alexey Spiridonov's avatar Alexey Spiridonov Committed by Facebook Github Bot

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
parent 7a4406ff
...@@ -10,11 +10,12 @@ import specs.sodium as sodium ...@@ -10,11 +10,12 @@ import specs.sodium as sodium
def fbcode_builder_spec(builder): def fbcode_builder_spec(builder):
# Projects that **depend** on fizz should don't need to build tests.
builder.add_option( builder.add_option(
'fizz/fizz/build:cmake_defines', 'fizz/fizz/build:cmake_defines',
{ {
'BUILD_SHARED_LIBS': 'OFF', # This is set to ON in the fizz `fbcode_builder_config.py`
'BUILD_TESTS': 'ON', 'BUILD_TESTS': 'OFF',
} }
) )
return { return {
......
...@@ -10,11 +10,12 @@ import specs.fizz as fizz ...@@ -10,11 +10,12 @@ import specs.fizz as fizz
def fbcode_builder_spec(builder): def fbcode_builder_spec(builder):
# Projects that **depend** on mvfst should don't need to build tests.
builder.add_option( builder.add_option(
'mvfst/build:cmake_defines', 'mvfst/build:cmake_defines',
{ {
'BUILD_SHARED_LIBS': 'OFF', # This is set to ON in the mvfst `fbcode_builder_config.py`
'BUILD_TESTS': 'ON', 'BUILD_TESTS': 'OFF',
} }
) )
return { return {
......
...@@ -14,9 +14,15 @@ import specs.zstd as zstd ...@@ -14,9 +14,15 @@ import specs.zstd as zstd
def fbcode_builder_spec(builder): def fbcode_builder_spec(builder):
# Projects that **depend** on proxygen should don't need to build tests
# or QUIC support.
builder.add_option( builder.add_option(
"proxygen/proxygen:cmake_defines", "proxygen/proxygen:cmake_defines",
{"BUILD_QUIC": "OFF", "BUILD_SHARED_LIBS": "OFF", "BUILD_TESTS": "ON"}, {
# These 2 are set to ON in `proxygen_quic.py`
"BUILD_QUIC": "OFF",
"BUILD_TESTS": "OFF",
},
) )
return { return {
......
...@@ -12,11 +12,17 @@ import specs.sodium as sodium ...@@ -12,11 +12,17 @@ import specs.sodium as sodium
import specs.wangle as wangle import specs.wangle as wangle
import specs.zstd as zstd import specs.zstd as zstd
# DO NOT USE THIS AS A LIBRARY -- this is currently effectively just part
# ofthe implementation of proxygen's `fbcode_builder_config.py`. This is
# why this builds tests and sets `BUILD_QUIC`.
def fbcode_builder_spec(builder): def fbcode_builder_spec(builder):
builder.add_option( builder.add_option(
"proxygen/proxygen:cmake_defines", "proxygen/proxygen:cmake_defines",
{"BUILD_QUIC": "ON", "BUILD_SHARED_LIBS": "OFF", "BUILD_TESTS": "ON"}, {
"BUILD_QUIC": "ON",
"BUILD_SHARED_LIBS": "OFF",
"BUILD_TESTS": "ON",
},
) )
return { return {
"depends_on": [folly, wangle, fizz, sodium, zstd, mvfst], "depends_on": [folly, wangle, fizz, sodium, zstd, mvfst],
......
...@@ -11,12 +11,12 @@ import specs.sodium as sodium ...@@ -11,12 +11,12 @@ import specs.sodium as sodium
def fbcode_builder_spec(builder): def fbcode_builder_spec(builder):
# Projects that simply depend on Wangle need not spend time on tests. # Projects that **depend** on wangle need not spend time on tests.
builder.add_option( builder.add_option(
'wangle/wangle/build:cmake_defines', 'wangle/wangle/build:cmake_defines',
{ {
'BUILD_SHARED_LIBS': 'OFF', # This is set to ON in the wangle `fbcode_builder_config.py`
'BUILD_TESTS': 'ON', 'BUILD_TESTS': 'OFF',
} }
) )
return { return {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment