Skip to content

Instantly share code, notes, and snippets.

View weliveindetail's full-sized avatar
🌍
🚲 🚲 🚲 🚲 🚲 🚲 🚲 🚲 🚲 🚲 🚲

Stefan Gränitz weliveindetail

🌍
🚲 🚲 🚲 🚲 🚲 🚲 🚲 🚲 🚲 🚲 🚲
View GitHub Profile
@weliveindetail
weliveindetail / 0001-local-Run-lit-without-building-all-the-tools.patch
Last active January 15, 2021 11:42
Run lit without building all the tools
From 2c8c15c8405f729801550eb9be87ab3a13878f8c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= <stefan.graenitz@gmail.com>
Date: Fri, 15 Jan 2021 12:39:39 +0100
Subject: [PATCH] [local] Run lit without building all the tools
---
llvm/test/lit.cfg.py | 48 ++++++++++++++++++++++----------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py
@weliveindetail
weliveindetail / MachoOnLinuxSearchGenerator.md
Created November 23, 2020 16:21
Drop linker mangling for in-memory MachO objects in Linux with LLVM JITLink

Please use this with a grain of salt: linking non-native object formats can cause arbitrary ABI incompatibilities.

#include <llvm/ADT/FunctionExtras.h>
#include <llvm/ExecutionEngine/Orc/TargetProcessControl.h>

class MachoOnLinuxSearchGenerator : public llvm::orc::DefinitionGenerator {
public:
  /// Create a DynamicLibrarySearchGenerator that searches for symbols in the
  /// library with the given handle. It drops one leading underscore where it
@weliveindetail
weliveindetail / ExtensibleRTTI.patch
Created February 25, 2021 16:39
[Draft] LLVM ExtensibleRTTI with implict static IDs and no CRTP
From 657708494fd1a26b745f4ea7f06ac32620970694 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= <stefan.graenitz@gmail.com>
Date: Thu, 25 Feb 2021 17:35:09 +0100
Subject: [PATCH] LLVM ExtensibleRTTI with implict static IDs and no CRTP
---
llvm/include/llvm/Support/Casting.h | 16 +-
llvm/include/llvm/Support/ExtensibleRTTI.h | 147 +++++++++++-------
llvm/lib/Support/ExtensibleRTTI.cpp | 7 +-
llvm/unittests/Support/ExtensibleRTTITest.cpp | 33 ++--
@weliveindetail
weliveindetail / rename_exif.py
Created November 25, 2021 12:26
Python3 script to rename files based on EXIF info
#!/usr/local/bin/python3
import os
from PIL import Image
from hachoir.parser import createParser
from hachoir.metadata import extractMetadata
# Parameters
dir = '/path/to/media/files'
image_extensions = ['.jpg']
video_extensions = ['.mp4']
> dumpbin /EXPORTS "C:\Program Files (x86)\libobjc\lib\objc.dll"
Microsoft (R) COFF/PE Dumper Version 14.33.31630.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file C:\Program Files (x86)\libobjc\lib\objc.dll

File Type: DLL
@weliveindetail
weliveindetail / raspbian11-aarch32-rpi3b-clang13.log
Last active February 9, 2024 10:28
All details about compilers
> clang-13 -xc++ -E -v /dev/null 2>&1
Raspbian clang version 13.0.1-6~deb11u1+rpi1
Target: arm-unknown-linux-gnueabihf
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/arm-linux-gnueabihf/10
Found candidate GCC installation: /usr/bin/../lib/gcc/arm-linux-gnueabihf/7
Found candidate GCC installation: /usr/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0
Found candidate GCC installation: /usr/bin/../lib/gcc/arm-linux-gnueabihf/8
Selected GCC installation: /usr/bin/../lib/gcc/arm-linux-gnueabihf/10
@weliveindetail
weliveindetail / README.md
Created May 17, 2023 12:48
git-bisect-llvm-project

Run git bisect:

> git bisect start
> git bisect good 72a72315b052180a7df90a26000fdca4ef09dd94
> git bisect bad f2bb57c19455e77fd71be782f9ee9092f31bd2a9
> git bisect run /tmp/check-kaleidoscope-ch4.sh
...

ready> ready> Evaluated to 5.000000
ready> ready> + exit_code=0
@weliveindetail
weliveindetail / README.md
Created July 2, 2023 12:27
git-baobab-me-test

Checkout repo with git-baobab-me script:

➜ cd /path/to/test-dir
➜ git clone https://github.com/weliveindetail/git-baobab.git git-baobab
Cloning into 'git-baobab'...
remote: Enumerating objects: 223, done.
remote: Counting objects: 100% (36/36), done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 223 (delta 19), reused 26 (delta 12), pack-reused 187
Receiving objects: 100% (223/223), 7.04 MiB | 5.98 MiB/s, done.
@weliveindetail
weliveindetail / 0001-hack-Remove-assertions-for-duplicate-option-registra.patch
Created July 5, 2023 12:13
[llvm][hack] Remove assertions for duplicate option registration
From 73643507109bc6cff9a6582d3902492acbd63793 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= <stefan.graenitz@gmail.com>
Date: Wed, 5 Jul 2023 14:09:32 +0200
Subject: [PATCH] [hack] Remove assertions for duplicate option registration
---
llvm/include/llvm/Support/CommandLine.h | 4 +++-
llvm/lib/Support/CommandLine.cpp | 6 +++---
2 files changed, 6 insertions(+), 4 deletions(-)
@weliveindetail
weliveindetail / 0001-Run-test-suite-on-mvp-package.patch
Created July 12, 2023 12:43
Run test suite on mvp-package with AppleClang and without OMVLL_PYTHONPATH
From beb385fd3dfc34523b9e968bbcd5a59c163dc743 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= <stefan.graenitz@gmail.com>
Date: Wed, 12 Jul 2023 14:39:03 +0200
Subject: [PATCH] Run test suite on mvp-package
OMVLL_PYTHONPATH
---
src/test/lit.cfg.py | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)