# frontend: fix \-fsingle-threaded default detection logic · gitcafe/zig

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

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

Visibility: public

Requested revision: e74ced21b70f229167765d863613d3d5033b93fe

Requested commit: e74ced21b70f229167765d863613d3d5033b93fe

Commit: e74ced21b70f229167765d863613d3d5033b93fe

Tree: ffcd8bf108d712e273b0e19f60dc9cd842f3b148

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
frontend: fix -fsingle-threaded default detection logic

The logic in 509be7cf1f10c5d329d2b0524f2af6bfcabd52de assumed that
`use_llvm` meant that the LLVM backend would be used, however, use_llvm
is false when there are no zig files to compile, which is the case for
zig cc. This logic resulted in `-fsingle-threaded` which made libc++
fail to compile for C++ code that includes the threading abstractions
(such as LLVM).

```

## Parents

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

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