Build: mention /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include

Fangrui Song 2019-12-28 09:40:51 -08:00
parent ffecfcdce9
commit e44588c515

@ -203,13 +203,14 @@ To build using MacPorts Clang add CMake flags
-DCMAKE_PREFIX_PATH=/opt/local/libexec/llvm-6.0 -DCMAKE_PREFIX_PATH=/opt/local/libexec/llvm-6.0
``` ```
With clang < 8, to make header completion work, use a [shell script wrapper](Install#shell-script-wrapper): See https://github.com/MaskRay/ccls/issues/512 , use a [shell script wrapper](Install#shell-script-wrapper):
```sh ```sh
#!/bin/sh #!/bin/sh
exec /path/to/ccls/Release/ccls -init='{"clang":{"extraArgs":["-isystem", "/Library/Developer/CommandLineTools/usr/include/c++/v1"]}}' "$@" exec /path/to/ccls/Release/ccls -init='{"clang":{"extraArgs":["-isystem", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"]}}' "$@"
``` ```
See https://github.com/MaskRay/ccls/issues/191#issuecomment-453809905 for details. With clang < 8, `"-isystem", "/Library/Developer/CommandLineTools/usr/include/c++/v1"` is also needed (https://github.com/MaskRay/ccls/issues/191#issuecomment-453809905)
### FreeBSD ### FreeBSD