Lines Matching +full:mac +full:- +full:clang
6 A read-only mirror is also available at https://github.com/google/perfetto .
12 has non-NDK depedencies into Android internals. Profilers and internal HAL/AIDL
19 [AOSP->Chromium autoroller](https://autoroll.skia.org/r/perfetto-chromium-autoroll)
33 tools/install-build-deps [--android] [--ui] [--linux-arm]
36 `--android` will pull the Android NDK, emulator and other deps required
39 `--ui` will pull NodeJS and all the NPM modules required to build the
40 Web UI. See the [UI Development](#ui-development) section below for more.
42 `--linux-arm` will pull the sysroots for cross-compiling for Linux ARM/64.
44 WARNING: Note that if you're using an M1 or any later ARM Mac, your Python
51 as primary build system. See the [Build files](#build-files) section below for
61 # Set only when building for Android, omit when building for linux, mac or win.
69 See the [Build Configurations](#build-configurations) and
70 [Building on Windows](#building-on-windows) sections below for more.
79 tools/ninja -C out/android
82 tools/ninja -C out/android \
114 This command pulls the UI-related dependencies (notably, the NodeJS binary)
118 tools/install-build-deps --ui
124 # Will build into ./out/ui by default. Can be changed with --out path/
134 # ui/build before running ui/run-dev-server.
135 ui/run-dev-server
141 source file is changed it, the script will automatically re-build it and show a
149 ui/run-unittests
158 ui/run-unittests --no-build
163 Script `ui/run-unittests` also supports `--watch` parameter, which would
165 used in conjunction with `--no-build`, and on its own as well.
172 To auto-format all source files, run ui/format-sources, which takes care of
178 # Pass --all for formatting all files under ui/src
179 ui/format-sources
184 [Useful Extensions](#useful-extensions) section on how to set this up.
192 on [GN][gn-quickstart].
210 - Hermetic clang + libcxx toolchain (both following chromium's revisions)
211 - GCC-7 and libstdc++ 6
212 - Cross-compiling for arm and arm64 (more below).
216 - Android's NDK r15c (using NDK's libcxx)
217 - AOSP's in-tree clang (using in-tree libcxx)
219 **Mac**
221 - XCode 9 / clang (maintained best-effort).
225 - Windows 10 with either MSVC 2019 or clang-cl (maintained best-effort).
230 need the full IDE, just the build tools) or the LLVM clang-cl compiler.
235 clang-cl support is more stable because that build configuration is actively
237 chrome://tracing). The MSVC build is maintained best-effort.
241 - `trace_processor_shell`: the trace importer and SQL query engine.
242 - `traceconv`: the trace conversion tool.
243 - `traced` and `perfetto`: the tracing service and cmdline client. They use an
244 …ternative implementation of the [inter-process tracing protocol](/docs/design-docs/api-and-abi.md#…
247 Googlers: see [go/perfetto-win](http://go/perfetto-win) for details.
248 - `perfetto_unittests` / `perfetto_integrationtests`: although they support only
255 You need all of these both for MSVC and clang-cl:
257 - [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/#build-tools-fo…
258 - [Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk/)
259 - [Python 3](https://www.python.org/downloads/windows/)
269 # This will download also the LLVM clang-cl prebuilt used by chromium.
270 python3 tools/install-build-deps
284 is_clang = true # Will use the hermetic clang-cl toolchain.
292 python3 tools/ninja -C out/win perfetto traced trace_processor_shell
295 ### Cross-compiling for Linux ARM/64
297 When cross-compiling for Linux you will need a sysroot. You have two options:
299 #### 1. Use the built-in sysroots based on Debian Sid
302 tools/install-build-deps --linux-arm
322 target_triplet = "aarch64-linux-gnu" # Or any other supported triplet.
325 For more details see the [Using cutom toolchains](#custom-toolchain) section
333 The following [GN args][gn-quickstart] are supported:
335 `target_os = "android" | "linux" | "mac"`:
342 host. 32-bit host builds are not supported.
349 (i) the `-g` compiler flag; (ii) setting/unsetting `-DNDEBUG`; (iii) turning
356 Use Clang (default: true) or GCC (false).
357 On Linux, by default it uses the self-hosted clang (see `is_hermetic_clang`).
358 On Android, by default it uses clang from the NDK (in `buildtools/ndk`).
359 On Mac, by default it uses the system version of clang (requires Xcode).
360 See also the [custom toolchain](#custom-toolchain) section below.
364 Use bundled toolchain from `buildtools/` rather than system-wide one.
368 If `is_hermetic_clang` is `false`, sets the `-stdlib` flag for clang
375 See also the [custom toolchain](#custom-toolchain) section below.
390 (Linux/Mac only)
400 (Linux/Mac only)
404 Enables [Undefined Behavior Sanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html)
406 ### {#custom-toolchain} Using custom toolchains and CC / CXX / CFLAGS env vars
409 necessary to switch off all the built-in toolchain-related path-guessing scripts
417 cc = "/path/to/gcc-like-compiler"
418 cxx = "/path/to/g++-like-compiler"
419 linker = "" # This is passed to -fuse-ld=...
432 `is_system_compiler = true` can be used also for cross-compilation.
433 In case of cross-compilation, the GN variables have the following semantic:
440 The cross-toolchain used to build the artifacts that run on the device is
449 target_triplet = "arm-linux-gnueabi" | "x86_64-linux-gnu" | ...
452 When integrating with GNU Makefile cross-toolchains build environments, a
485 [gn-quickstart]: https://gn.googlesource.com/gn/+/master/docs/quick_start.md
493 tools/gn gen out/default --export-compile-commands
496 After generating, it can be used in CLion (File -> Open -> Open As Project),
504 - [Clang-Format](https://marketplace.visualstudio.com/items?itemName=xaver.clang-format)
505 - [C/C++](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)
506 - [clangd](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clang…
507 - [Native Debug](https://marketplace.visualstudio.com/items?itemName=webfreak.debug)
508 - [GNFormat](https://marketplace.visualstudio.com/items?itemName=persidskiy.vscode-gnformat)
509 - [ESlint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
510 - [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint)
511 - [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
519 "C_Cpp.clang_format_path": "${workspaceRoot}/buildtools/mac/clang-format",
526 "--compile-commands-dir=${workspaceFolder}/out/mac_debug",
527 "--completion-style=detailed",
528 "--header-insertion=never"
536 "editor.defaultFormatter": "esbenp.prettier-vscode"
539 "editor.defaultFormatter": "esbenp.prettier-vscode"
544 Replace `/mac/` with `/linux64/` on Linux.
559 "args": ["--gtest_filter=TracingServiceImplTest.StopTracingTriggerRingBuffer"],
567 Then open the command palette `Meta`+`Shift`+`P` -> `Debug: Start debugging`.