# CLI: adjust order of operations of system libraries · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/c65a06188173a4f1c911bfd44084a9dea57fe330)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: c65a06188173a4f1c911bfd44084a9dea57fe330

Requested commit: c65a06188173a4f1c911bfd44084a9dea57fe330

Commit: c65a06188173a4f1c911bfd44084a9dea57fe330

Tree: 54c52dcd5ed1e57a7bb3f2fb86f152c4acb913cd

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
CLI: adjust order of operations of system libraries

First, system_libs are collected into a list. This is the same as
before.

Next, system_libs are filtered into external_system_libs, which is the
same list but without any libc, compiler_rt, etc.

At this point, if there are any external system libs, native library
directory paths are detected and added to lib_dirs.

Finally, extern_system_libs are filtered into resolved_system_libs,
which has full paths to all of the libraries. This is the list passed
into Compilation.

This makes the required changes noted by @ifreund in the code review for
this branch.

```

## Parents

- [256074428fc987c16fe5e1b862c6e5fc8c2123a6](https://git.cafe/gitcafe/zig/commit/256074428fc987c16fe5e1b862c6e5fc8c2123a6?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/c65a06188173a4f1c911bfd44084a9dea57fe330?format=markdown)
