.known-couplings/clang-resource-dir.md
clang_resource_dir (src/libponyc/codegen/gencshim.cc) locates clang's builtin headers at fixed offsets from the ponyc binary: ../lib/clang/<major> (installed; the Makefile install target copies it on Linux/macOS, the root CMakeLists install(DIRECTORY ...) rule on Windows) and ../libs/lib/clang/<major> (build tree). Moving where packaging or the libs build puts lib/clang breaks C shim compilation with "unable to find clang's resource directory". The same applies to ponyc's own headers for shims (add_pony_include_args): ../include installed (the Makefile install target on Linux/macOS and the root CMakeLists install(FILES ...) rules on Windows copy pony.h + pony/detail/atomics.h there, plus platform.h's closure — ponyassert.h, platform.h, threads.h, paths.h, and on Windows vcvars.h — so a shim can also #include <ponyassert.h>; those are unstable internal headers, only pony.h is a stable interface), ../../src/libponyrt + ../../src/common in a build tree. The gtest suite only exercises the build-tree offsets. Run: the CShimTest suite in libponyc.tests; on packaging changes, also verify a shim program builds against a make install tree.