Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ocamlmklib: use
ar rcs
instead of ar rc
(#11670)
Under macOS at least, `ar rc` on an empty list of files produces an archive with no table of contents, which triggers an error when linked. With `ar rcs`, we force the creation of a table of contents. macOS prints a warning, but the resulting archive causes no errors during linking. The `s` option to `ar` is specified as "an XSI extension" in IEEE Std 1003.1-2017, but seems supported by all the toolchains we care about. The call to `ar rc` in utils/ccomp.ml is unchanged because the list of object files is never empty, and IEEE Std 1003.1 says that `ar rc` must create a symbol table in this case. Follow-up to #11184 (cherry picked from commit 2f0c77c)
- Loading branch information