Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: docs/clang.md

Issue 1881283002: Update Chromium docs on using clang (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: docs/clang.md
diff --git a/docs/clang.md b/docs/clang.md
index 5b5b43f7ada6624b746e7b4b8a1fc7d747ebe57d..4e12a7e48c05c4b533bdfe3566f70d4aba2b024b 100644
--- a/docs/clang.md
+++ b/docs/clang.md
@@ -18,20 +18,11 @@ Get clang (happens automatically during `gclient runhooks` on Mac and Linux):
tools/clang/scripts/update.py
-(Only needs to be run once per checkout, and clang will be automatically updated
-by `gclient runhooks`.)
+Only needs to be run once per checkout, and clang will be automatically updated
+by `gclient runhooks`.
-### Reverting to gcc on linux
-
-We don't have bots that test this, but building with gcc4.8+ should still work
-on Linux. If your system gcc is new enough, use this to build with gcc if you
-don't want to build with clang:
-
- GYP_DEFINES=clang=0 build/gyp_chromium
-
-### Ninja
-
-Regenerate the build files (`clang=1` is on by default on Mac and Linux):
+Regenerate the ninja build files with Clang enabled. Again, on Linux and Mac,
+Clang is the default compiler.
If you use gyp: `GYP_DEFINES=clang=1 build/gyp_chromium`
@@ -39,6 +30,14 @@ If you use gn, run `gn args` and add `is_clang = true` to your args.gn file.
Build: `ninja -C out/Debug chrome`
+## Reverting to gcc on linux
+
+We don't have bots that test this, but building with gcc4.8+ should still work
+on Linux. If your system gcc is new enough, use this to build with gcc if you
+don't want to build with clang:
+
+ GYP_DEFINES=clang=0 build/gyp_chromium
+
## Mailing List
http://groups.google.com/a/chromium.org/group/clang/topics
@@ -79,8 +78,6 @@ See [clang_static_analyzer.md](clang_static_analyzer.md).
## Windows
-**Experimental!**
-
clang can be used as compiler on Windows. Clang uses Visual Studio's linker and
SDK, so you still need to have Visual Studio installed.
@@ -97,9 +94,11 @@ python build\gyp_chromium
ninja -C out\Debug chrome
```
+The `update.py` script only needs to be run once per checkout. Clang will be
+kept up-to-date by `gclient runhooks`.
+
Current brokenness:
-* Goma doesn't work.
* Debug info is very limited.
* To get colored diagnostics, you need to be running
[ansicon](https://github.com/adoxa/ansicon/releases).
@@ -131,3 +130,16 @@ If your clang revision is very different from the one currently used in chromium
* Check `tools/clang/scripts/update.py` to find chromium's clang revision
* You might have to tweak warning flags. Or you could set `werror=` in the
line above to disable warnings as errors (but this only works on Linux).
+
+## Using LLD
+
+**Experimental!**
+
+LLD is a relatively new linker from LLVM. The current focus is on Windows and
+Linux support, where it can link Chrome approximately twice as fast as gold and
+MSVC's link.exe as of this writing. LLD does not yet support generating PDB
+files, which makes it hard to debug Chrome while using LLD.
+
+If you use gyp, you can enable it with `GYP_DEFINES=lld=1`. If you use gn, set
+`use_lld = true` in args.gn. Currently this configuration is only supported on
+Windows.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698