From b93eecb0f9b8a2bd9dcff0452ffeaa310862e7dc Mon Sep 17 00:00:00 2001 From: Shayne Fletcher Date: Tue, 16 Jan 2024 08:18:54 -0800 Subject: [PATCH] add -lzstd to ppx (#534) Summary: fix link error on macos x86_64 noted in https://github.com/facebook/buck2/pull/533. test results showing the fix works here: https://github.com/shayne-fletcher/buck2/actions/runs/7515602243 Test Plan: Imported from GitHub, without a `Test Plan:` line. https://www.internalfb.com/sandcastle/workflow/4386506037060688764 Reviewed By: ndmitchell Differential Revision: D52802355 Pulled By: shayne-fletcher --- .circleci/config.yml | 6 ++++-- examples/with_prelude/ocaml/ppx/BUCK | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c2b3e08aa38fe..a680a1c58ac2a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,6 +27,7 @@ commands: - run: name: Set OCaml envs command: | + echo 'export PATH=/opt/homebrew/bin:"$PATH"' >> "$BASH_ENV" echo 'eval $(opam env)' >> "$BASH_ENV" setup_linux_env: @@ -211,11 +212,12 @@ jobs: - run: name: Build example/prelude directory command: | + set -x cd examples/with_prelude /tmp/artifacts/buck2 init cp -r ../../prelude prelude # Additional setup for ocaml - source ./ocaml-setup.sh + ./ocaml-setup.sh /tmp/artifacts/buck2 build //... -v 2 /tmp/artifacts/buck2 test //... -v 2 - build_example_conan @@ -252,7 +254,7 @@ jobs: /tmp/artifacts/buck2 init cp -r ../../prelude prelude # Additional setup for ocaml - source ./ocaml-setup.sh + ./ocaml-setup.sh /tmp/artifacts/buck2 build //... -v 2 /tmp/artifacts/buck2 test //... -v 2 - build_example_conan diff --git a/examples/with_prelude/ocaml/ppx/BUCK b/examples/with_prelude/ocaml/ppx/BUCK index 000b749610e4c..fc92b744f841d 100644 --- a/examples/with_prelude/ocaml/ppx/BUCK +++ b/examples/with_prelude/ocaml/ppx/BUCK @@ -15,6 +15,8 @@ ocaml_binary( srcs = ["ppx_driver.ml"], compiler_flags = [ "-linkall", + "-cclib", + "-lzstd", ], deps = [ ":ppx-record-selectors",