diff --git a/build/fbcode_builder/getdeps/buildopts.py b/build/fbcode_builder/getdeps/buildopts.py index 63bf7c696e1a..dcf551cb8c33 100644 --- a/build/fbcode_builder/getdeps/buildopts.py +++ b/build/fbcode_builder/getdeps/buildopts.py @@ -368,6 +368,11 @@ def add_prefix_to_env( elif "/bz2-" in d: add_flag(env, "CPPFLAGS", f"-I{includedir}", append=append) + # The thrift compiler's built-in includes are installed directly to the include dir + includethriftdir = os.path.join(d, "include", "thrift") + if os.path.exists(includethriftdir): + add_path_entry(env, "THRIFT_INCLUDE_PATH", includedir, append=append) + # Map from FB python manifests to PYTHONPATH pydir = os.path.join(d, "lib", "fb-py-libs") if os.path.exists(pydir):