| OLD | NEW |
| 1 # Clang | 1 # Clang |
| 2 | 2 |
| 3 [Clang](http://clang.llvm.org/) is a compiler with many desirable features | 3 [Clang](http://clang.llvm.org/) is a compiler with many desirable features |
| 4 (outlined on their website). | 4 (outlined on their website). |
| 5 | 5 |
| 6 Chrome can be built with Clang. It is now the default compiler on Mac and Linux | 6 Chrome can be built with Clang. It is now the default compiler on Mac and Linux |
| 7 for building Chrome, and it is currently useful for its warning and error | 7 for building Chrome, and it is currently useful for its warning and error |
| 8 messages on Android and Windows. | 8 messages on Android and Windows. |
| 9 | 9 |
| 10 See | 10 See |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 ``` shell | 86 ``` shell |
| 87 python tools\clang\scripts\update.py | 87 python tools\clang\scripts\update.py |
| 88 set GYP_DEFINES=clang=1 | 88 set GYP_DEFINES=clang=1 |
| 89 python build\gyp_chromium | 89 python build\gyp_chromium |
| 90 | 90 |
| 91 # or, if you use gn, run `gn args` and add `is_clang = true` to your args.gn | 91 # or, if you use gn, run `gn args` and add `is_clang = true` to your args.gn |
| 92 ninja -C out\Debug chrome | 92 ninja -C out\Debug chrome |
| 93 ``` | 93 ``` |
| 94 | 94 |
| 95 The `update.py` script only needs to be run once per checkout. Clang will be | 95 The `update.py` script only needs to be run once per checkout. Clang will be |
| 96 kept up-to-date by `gclient runhooks`. | 96 kept up to date by `gclient runhooks`. |
| 97 | 97 |
| 98 Current brokenness: | 98 Current brokenness: |
| 99 | 99 |
| 100 * Debug info is very limited. | 100 * Debug info is very limited. |
| 101 * To get colored diagnostics, you need to be running | 101 * To get colored diagnostics, you need to be running |
| 102 [ansicon](https://github.com/adoxa/ansicon/releases). | 102 [ansicon](https://github.com/adoxa/ansicon/releases). |
| 103 | 103 |
| 104 ## Using a custom clang binary | 104 ## Using a custom clang binary |
| 105 | 105 |
| 106 If you want to try building Chromium with your own clang binary that you've | 106 If you want to try building Chromium with your own clang binary that you've |
| (...skipping 27 matching lines...) Expand all Loading... |
| 134 **Experimental!** | 134 **Experimental!** |
| 135 | 135 |
| 136 LLD is a relatively new linker from LLVM. The current focus is on Windows and | 136 LLD is a relatively new linker from LLVM. The current focus is on Windows and |
| 137 Linux support, where it can link Chrome approximately twice as fast as gold and | 137 Linux support, where it can link Chrome approximately twice as fast as gold and |
| 138 MSVC's link.exe as of this writing. LLD does not yet support generating PDB | 138 MSVC's link.exe as of this writing. LLD does not yet support generating PDB |
| 139 files, which makes it hard to debug Chrome while using LLD. | 139 files, which makes it hard to debug Chrome while using LLD. |
| 140 | 140 |
| 141 If you use gyp, you can enable it with `GYP_DEFINES=lld=1`. If you use gn, set | 141 If you use gyp, you can enable it with `GYP_DEFINES=lld=1`. If you use gn, set |
| 142 `use_lld = true` in args.gn. Currently this configuration is only supported on | 142 `use_lld = true` in args.gn. Currently this configuration is only supported on |
| 143 Windows. | 143 Windows. |
| OLD | NEW |