Skip to content

Instantly share code, notes, and snippets.

View petrhosek's full-sized avatar

Petr Hosek petrhosek

View GitHub Profile
@petrhosek
petrhosek / CMakeLists.txt
Created July 14, 2023 06:26
Using Multi-Config for Multilibs
cmake_minimum_required(VERSION 3.16)
project(Foo C)
add_library(foo STATIC foo.c)
core.workflow(
name = "scudo",
mode = "ITERATIVE",
origin = git.github_origin(
url = "https://github.com/llvm/llvm-project.git",
ref = "master",
describe_version = False,
),
destination = git.github_destination(
url = "git@github.com:petrhosek/scudo.git",
#include "foo/foo.h"
#include "foo/foo_internal.h"
#include "bar/bar.h"
void bar() {
foo();
foo_internal();
}
Dist std stage2 (x86_64-unknown-linux-gnu -> x86_64-unknown-fuchsia)
Building stage2 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-fuchsia)
Compiling core v0.0.0 (file:///usr/local/google/home/phosek/fuchsia/infra/recipes/.recipe_deps/recipe_engine/workdir/rust/src/libcore)
base/at_exit.h
base/atomicops.h
base/atomic_ref_count.h
base/bind.h
base/callback.h
base/command_line.h
base/containers/hash_tables.h
base/containers/stack_container.h
base/environment.h
base/files/file.h
@petrhosek
petrhosek / git-llvm-clone.sh
Created February 7, 2017 00:38
Checkout LLVM from Git
#!/usr/bin/env bash
readonly REPOSITORIES=(
"http://llvm.org/git/llvm.git llvm llvm"
"http://llvm.org/git/clang.git cfe llvm/tools/clang"
"http://llvm.org/git/lld.git lld llvm/tools/lld"
"http://llvm.org/git/lldb.git lldb llvm/tools/lldb"
"http://llvm.org/git/compiler-rt.git compiler-rt llvm/runtimes/compiler-rt"
"http://llvm.org/git/libcxx.git libcxx llvm/projects/libcxx"
"http://llvm.org/git/libcxxabi.git libcxxabi llvm/projects/libcxxabi"

Keybase proof

I hereby claim:

  • I am petrhosek on github.
  • I am petrhosek (https://keybase.io/petrhosek) on keybase.
  • I have a public key whose fingerprint is 7E5F 5F3B 67F2 55C5 99BB 21B9 D718 485C 5AC3 FFF1

To claim this, I am signing this object:

#!/usr/bin/env bash
set -e
set -o pipefail
SRCDIR=/srcdir
BUILDDIR=/build
PKGDIR=/toolchain
die() {
echo "die: $*" 1>&2
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
@petrhosek
petrhosek / test-rsize.gnuplot
Last active May 11, 2016 19:17
LLVM MC bundle emission memory usage
#!/usr/bin/gnuplot
set xlabel "Input size"
set ylabel "Output size"
set terminal dumb size 200,80
plot 'test.dat' using 1:2 with lines