Skip to content

Commit

Permalink
Simplify library search process
Browse files Browse the repository at this point in the history
When searching for libraries we were looking for both the `lib`
prefixed version and the non-`lib`-prefixed name.

While refactoring code in #13799 I noticed that we really don't need
to be handling both these cases.  We can assume that file on disc will
always have the lib prefix and the library names being processed here
will never have it.

This does remove some undocumented/untested (and I would have better
not supported) uses.

1. Linking with `-llibc` rather than `-lc` will no longer work.
2. Linking a library called `foo.a` (without a `lib` prefix) via `-lfoo`
   will no longer work.

Neither of these use cases is supported by gcc or clang and I don't
think it was ever intentional that we supported these.
  • Loading branch information
sbc100 committed Aug 19, 2021
1 parent ff75baa commit 25cf99e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ See docs/process.md for more on how version tagging works.
- In order to behave more like clang and gcc, emscripten no longer
supports some nonstandard methods of library lookup (that worked
unintentionally and were untested and not documented):
- Refactoring of the library search algorithm means that emscripten no longer
supports some (unintented) methods of library lookup:
1. Linking with `-llibc` rather than `-lc` will no longer work.
2. Linking a library called `foo.a` via `-lfoo` will no longer work.
(libraries found via `-l` have to start with `lib`)
Expand Down

0 comments on commit 25cf99e

Please sign in to comment.