Skip to content

Commit f2f8a55

Browse files
excelle08facebook-github-bot
authored andcommitted
Fix AdSim OSS build (#213)
Summary: Pull Request resolved: #213 Fix AdSim's OSS build: - Keep AdSim build artifacts in benchmarks/adsim/build folder - Prevent fb303 from building mvfst again (since it's already built in fbthrift) - Update ThriftLibrary.cmake to match the current version of fbthrift codegen output Differential Revision: D81974904 fbshipit-source-id: 58e94f337abf80e890e571b08bfecdca08ba678c
1 parent 6861f83 commit f2f8a55

3 files changed

Lines changed: 16 additions & 7 deletions

File tree

packages/adsim/build-deps.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ build_dependency() {
4646
local dep_name="$1"
4747
local repo_url="$2"
4848
local version="$3"
49+
local extra_build_args="$4"
4950

5051
echo "Building ${dep_name}..."
5152

@@ -77,7 +78,10 @@ build_dependency() {
7778
build "${dep_name}" --src-dir ${ADSIM_DEPS_DIR}/${dep_name} \
7879
--install-prefix="${ADSIM_STAGING_DIR}" \
7980
--install-dir="${ADSIM_STAGING_DIR}" \
80-
--verbose
81+
--verbose \
82+
$extra_build_args
83+
84+
install_status="$?"
8185

8286
echo "python3 "${ADSIM_DEPS_DIR}/${dep_name}/build/fbcode_builder/getdeps.py" \
8387
--scratch-path="${ADSIM_STAGING_DIR}/getdeps-scratch" \
@@ -86,16 +90,22 @@ build_dependency() {
8690
build "${dep_name}" --src-dir ${ADSIM_DEPS_DIR}/${dep_name} \
8791
--install-prefix="${ADSIM_STAGING_DIR}" \
8892
--install-dir="${ADSIM_STAGING_DIR}" \
89-
--verbose"
93+
--verbose \
94+
$extra_build_args"
9095
popd || exit
9196

92-
echo "${dep_name} build completed successfully"
97+
if [ "$install_status" -eq 0 ]; then
98+
echo "${dep_name} build completed successfully"
99+
else
100+
echo "${dep_name} build failed!"
101+
exit $install_status
102+
fi
93103
}
94104

95105
# Build core Facebook C++ libraries: async runtime, RPC framework, monitoring
96106
build_dependency "folly" "https://github.com/facebook/folly.git" "${FOLLY_VERSION}"
97107
build_dependency "fbthrift" "https://github.com/facebook/fbthrift.git" "${FBTHRIFT_VERSION}"
98-
build_dependency "fb303" "https://github.com/facebook/fb303.git" "${FB303_VERSION}"
108+
build_dependency "fb303" "https://github.com/facebook/fb303.git" "${FB303_VERSION}" "--no-deps"
99109

100110
# Build FBGEMM (Facebook General Matrix Multiplication) for ML workload simulation
101111
./install_fbgemm.sh

packages/adsim/install_adsim.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ BENCHPRESS_ROOT="$(readlink -f "$BPKGS_ADSIM_ROOT/../..")"
3838
BENCHMARKS_DIR="${BENCHPRESS_ROOT}/benchmarks/adsim"
3939

4040
# Temporary directory for intermediate build artifacts
41-
BUILD_DIR="${BENCHPRESS_ROOT}/build"
41+
BUILD_DIR="${BENCHMARKS_DIR}/build"
4242

4343
################################################################################
4444
# Setup Functions

packages/adsim/src/CMake/ThriftLibrary.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,8 @@ macro(thrift_generate
229229
${output_path}/gen-${language}/${source_file_name}_constants.cpp
230230
${output_path}/gen-${language}/${source_file_name}_data.cpp
231231
${output_path}/gen-${language}/${source_file_name}_types.cpp
232-
${output_path}/gen-${language}/${source_file_name}_types_binary.cpp
233232
${output_path}/gen-${language}/${source_file_name}_types_compact.cpp
234-
${output_path}/gen-${language}/${source_file_name}_types_serialization.cpp
233+
${output_path}/gen-${language}/${source_file_name}_types_binary.cpp
235234
)
236235
if("${options}" MATCHES "layouts")
237236
set("${target_file_name}-${language}-SOURCES"

0 commit comments

Comments
 (0)