Skip to content

Commit

Permalink
clang docs: Update page a bit.
Browse files Browse the repository at this point in the history
The Windows bits were outdated.

Bug: none
Change-Id: I45fd6b70e013491080bc7028b7ce5be600e8fab2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1790124
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694325}
  • Loading branch information
nico authored and Commit Bot committed Sep 6, 2019
1 parent 94b15fa commit b161701
Showing 1 changed file with 10 additions and 30 deletions.
40 changes: 10 additions & 30 deletions docs/clang.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
# Clang

[Clang](http://clang.llvm.org/) is the main supported compiler when
building Chromium on all platforms.
Chromium ships a prebuilt [clang](http://clang.llvm.org) binary.
It's just upstream clang built at a known-good revision that we
bump every two weeks or so.

Known [clang bugs and feature
requests](http://code.google.com/p/chromium/issues/list?q=label:clang).
This is the only supported compiler for building Chromium.

[TOC]

## Building with clang
## Using gcc on Linux

This happens by default, with clang binaries being fetched by gclient
during the `gclient runhooks` phase. To fetch them manually, or build
a local custom clang, use

tools/clang/scripts/update.py

Run `gn args` and make sure there is no `is_clang = false` in your args.gn file.

Build: `ninja -C out/gn chrome`

## Reverting to gcc on Linux or MSVC on Windows

There are no bots that test this but `is_clang = false` will revert to
gcc on Linux and to Visual Studio on Windows. There is no guarantee it
will work.
`is_clang = false` will make the build use system gcc on Linux. There are no
bots that test this and there is no guarantee it will work, but we accept
patches for this configuration.

## Mailing List

Expand Down Expand Up @@ -66,16 +54,8 @@ See [clang_static_analyzer.md](clang_static_analyzer.md).

## Windows

Since October 2017, clang is the default compiler on Windows. It uses
MSVC's linker and SDK, so you still need to have Visual Studio with
C++ support installed.

To use MSVC's compiler (if it still works), use `is_clang = false`.

Current brokenness:

* To get colored diagnostics, you need to be running
[ansicon](https://github.com/adoxa/ansicon/releases).
clang is the default compiler on Windows. It uses MSVC's SDK, so you still need
to have Visual Studio with C++ support installed.

## Using a custom clang binary

Expand Down

0 comments on commit b161701

Please sign in to comment.