Pacific++ 2017: Chandler Carruth "LLVM: A Modern, Open C++ Toolchain"

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ธ.ค. 2024

ความคิดเห็น • 35

  • @piemur2000
    @piemur2000 7 ปีที่แล้ว +18

    For people wondering about clang-tidy missing modernize checks, the build is correct, you just need the -checks="*" option to enable them.

  • @TheDarkOne629
    @TheDarkOne629 2 ปีที่แล้ว

    31:48 This is so true. I'm teaching C and I tell all my students to use it (in the web of cause). I even force it to give errors when compiling my code normally when I work on some project myself or with a group.
    It even helps to prevent some bugs, like when a scope is closed too early and the dev doesn't realize (which happens more often than you might think).

  • @echosystemd
    @echosystemd 7 ปีที่แล้ว +4

    clang is not installed by default in RHEL. It's available in two ways, first in EPEL(version 3.4), second in Red Hat developer toolsets(versioin 4.0).

    • @ericcurtin2812
      @ericcurtin2812 7 ปีที่แล้ว

      Yeah surprised he said that, most C++ devs are using EPEL or dev-toolsets also on RHEL. In Ubuntu it's in the Universe repo, which is the equivalent to EPEL on Ubuntu

  • @chrimony
    @chrimony 2 ปีที่แล้ว +1

    Four minutes to compile Clang/LLVM! You'd need half of Amazon's compute cloud to do that today.

  • @tomkirbygreen
    @tomkirbygreen 6 ปีที่แล้ว

    Thank you Chandler, excellent talk. Building my own Clang install has long been something I wanted to do but was a tad apprehensive about.

  • @Tinfoilpain
    @Tinfoilpain 7 ปีที่แล้ว +38

    I think one day, clang-format will just write software for you.

    • @jim0_o
      @jim0_o 4 ปีที่แล้ว +1

      Pretty sure it already can, just no one has learned how to ask it nicely.

  • @mrlithium69
    @mrlithium69 7 ปีที่แล้ว +9

    oh fuck, his keyboard layout is US(Dvorak) - nerd clout +9000

  • @HorochovPL
    @HorochovPL 3 ปีที่แล้ว

    It's weird to listen to LLVM introduction after using it for a quite long time, including ThinLTO and still learning something new - thread sanitizer

  • @fschutt247
    @fschutt247 6 ปีที่แล้ว

    Note that the main LLVM page seems to be using SVN, not Git. The documentation might be outdated.

    • @Pacificplusplus
      @Pacificplusplus  6 ปีที่แล้ว

      There are details on the git mirror here: llvm.org/docs/GettingStarted.html#git-mirror

  • @ailijic
    @ailijic 7 ปีที่แล้ว +5

    What terminal emulator is he using?

    • @chris3kpl
      @chris3kpl 7 ปีที่แล้ว +7

      fish shell with powerline and sshing using mosh, edit with nvim (or vim). Virutal console managed by tmux.
      also not using qwerty, but dvorak keyboard for faster typing :)

  • @kheartztv
    @kheartztv 7 ปีที่แล้ว +2

    Clang format performs witchcraft.

  • @platin2148
    @platin2148 7 ปีที่แล้ว

    Is there some documentation out there how to build for example an clang compiler for the RaspberryPi as i couldn’t even find a very basic tut and the official one is more or less a very hard to read thing.

  • @clehaxze
    @clehaxze 7 ปีที่แล้ว +18

    Use Arch Linux. You get GCC 7.2 and clang 5 by default!

    • @17plus9
      @17plus9 6 ปีที่แล้ว

      Yeah

    • @xgallomx
      @xgallomx 5 ปีที่แล้ว

      10/10 Recommend

    • @OpenGL4ever
      @OpenGL4ever 5 ปีที่แล้ว

      I will just use Debian backports.

  • @victornoagbodji
    @victornoagbodji 7 ปีที่แล้ว +4

    anyone knows how to setup tmux like Chandler did? thanks.

    • @thongphamvan9333
      @thongphamvan9333 5 ปีที่แล้ว +1

      The answer might be late, but you can install the tmux theme pack plugin, and also install oh-my-{zsh/bash/fish}. Also install fzf for the best experience

  • @estanforth6754
    @estanforth6754 4 ปีที่แล้ว

    You can fix the first 6 minutes by using a different distro

  • @bocckoka
    @bocckoka 5 ปีที่แล้ว

    My laptop would be slow here, but we have a machine named after Balerion...

  • @stephenl7797
    @stephenl7797 6 ปีที่แล้ว

    28:05 never use map :)

  • @christopherstern2417
    @christopherstern2417 6 ปีที่แล้ว

    +asan!

  • @thongphamvan9333
    @thongphamvan9333 5 ปีที่แล้ว

    He really use dvorak keyboard layout

  • @piotrarturklos
    @piotrarturklos 7 ปีที่แล้ว

    I tried to compile clang as shown in the talk (actually I used commands from official documentation) on Ubuntu 16.04, but it failed to build. This is as far as I got. Distributing binaries *IS* important. It doesn't have to be in the official package repo of the OS, but *please* distribute binaries.

    • @Pacificplusplus
      @Pacificplusplus  7 ปีที่แล้ว +2

      They do: releases.llvm.org/download.html

    • @piotrarturklos
      @piotrarturklos 7 ปีที่แล้ว +1

      I'm sorry, you are right. I must have ignored those binaries because I wanted to try building myself, like the video encourages. :) Thanks, I'll give it a go!

  • @jagc2206
    @jagc2206 6 ปีที่แล้ว +1

    I mean, nice i3wm setup, but it's still cpp.

    • @davidr2421
      @davidr2421 2 ปีที่แล้ว

      4 years late (lol), but it's not i3wm, it's awesomwm.

  • @LemonChieff
    @LemonChieff 5 ปีที่แล้ว

    Just one thing: DO NOT use reinterpret_cast. If you really must do it and you know what you're doing: first read this git.io/Jels3 and then don't do it.
    If you NEED to use it then maybe some of your code might be wrong to begin with.
    So whenever that happens consider rewriting the class/struct/function/thing it shouldn't be hard if you have tests. Try to provide explicit conversions. (Yes, it might be slower in some edge-cases but it won't be UB).
    If you're using it than your code might as well be made up of void pointers.

  • @АдамСмит-ы7р
    @АдамСмит-ы7р 4 ปีที่แล้ว

    Clang-format is in fact a pretty stupid tool: it doesn't operate a real C++ AST, just some hacks around a lexer. Hence, you can't get different rules for function calls and macro calls-both look like "some invocation" to clang-format :(
    So, if you (for some reason) use something like `STRINGIFY(macro-will-turn-this-into-string-literal)`, default settings will turn this into `STRINGIFY(macro - will - turn - this - into - string - literal)`, changing behavior of your code. And it's not just a bug to be fixed-it's not likely to ever change without rewriting clang-format almost from scratch.
    Of course, using weird macros is a bad idea regardless formatting, but preserving original semantics is kinda reasonable thing to assume about a formatter, which is not the case with clang-format.