Skip to content

Instantly share code, notes, and snippets.

View theoparis's full-sized avatar
🔥
Compiling LLVM with -fskibidi -Ohio -march=rizz

Theo Paris theoparis

🔥
Compiling LLVM with -fskibidi -Ohio -march=rizz
View GitHub Profile
@theoparis
theoparis / qemu_softmmu.patch
Created March 26, 2024 00:27
Build qemu softmmu targets as static libraries
diff --git a/meson.build b/meson.build
index c9c3217ba4..d935e8f0bd 100644
--- a/meson.build
+++ b/meson.build
@@ -3905,8 +3905,9 @@ foreach target : target_dirs
objects: objects,
include_directories: target_inc,
c_args: c_args,
- build_by_default: false,
- name_suffix: 'fa')
@theoparis
theoparis / fetch.py
Created February 19, 2024 02:00
Git clone multithreaded progress bar with python and rich
import os
from concurrent.futures import ThreadPoolExecutor
import pygit2
from rich.console import Group
from rich.live import Live
from rich.progress import (BarColumn, DownloadColumn, Progress, TextColumn,
TimeRemainingColumn, TransferSpeedColumn)
@theoparis
theoparis / README.md
Created January 31, 2024 23:04
How to speed up pacman on Arch Linux

Install Dependencies

These steps require a non-root user and doas!

doas pacman -S powerpill

cd /tmp
git clone https://aur.archlinux.org/paru-bin.git
cd paru-bin
@theoparis
theoparis / Makefile
Created January 14, 2024 02:52
Build llvm with C++20 modules + mlir with the vulkan runner
ROOT_DIR = $(PWD)
THIRD_PARTY_DIR = $(ROOT_DIR)/third_party
INSTALL_DIR = $(ROOT_DIR)/install
# TODO: this be in its own git repository
llvm-configure:
cmake -S $(ROOT_DIR)/../llvm-project/llvm \
-B $(ROOT_DIR)/build/llvm \
-G Ninja \
@theoparis
theoparis / standards.cmake
Created December 12, 2023 04:24
standards.cmake
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
add_compile_options(
-Weverything
)
file(GLOB_RECURSE ALL_SOURCE_FILES *.cpp *.c *.hpp *.h)
add_custom_target(
clang_tidy
diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt
index 39f4f6cf5..b9cb91a27 100644
--- a/loader/CMakeLists.txt
+++ b/loader/CMakeLists.txt
@@ -326,7 +326,6 @@ if(WIN32)
set(LOADER_UNKNOWN_CHAIN_LIBRARY $<$<TARGET_EXISTS:loader-unknown-chain>:$<TARGET_OBJECTS:loader-unknown-chain>>)
add_library(vulkan
- SHARED
${NORMAL_LOADER_SRCS}
@theoparis
theoparis / pure_wl_toolkit_21.diff
Last active November 10, 2023 21:05
jdk 21 with pure wayland patch (jdk-21-ga branch)
diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4
index f8fbe14cc..88b0cedfd 100644
--- a/make/autoconf/flags-cflags.m4
+++ b/make/autoconf/flags-cflags.m4
@@ -206,7 +206,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
clang)
DISABLE_WARNING_PREFIX="-Wno-"
BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
- CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
+ CFLAGS_WARNINGS_ARE_ERRORS="-Wno-error"
@theoparis
theoparis / emerge.py
Created October 29, 2023 06:20
Send emerge output from gentoo portage to a custom discord status
#!/usr/bin/env python3
import re
import subprocess
import sys
import json
import os
import requests
import threading
token = os.environ.get("DISCORD_TOKEN")
package com.theoparis.fluidcraft_datagen;
import com.google.common.base.CaseFormat;
import java.lang.reflect.RecordComponent;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@theoparis
theoparis / FindLLVM.cmake
Created September 18, 2023 01:15
cmake/FindLLVM.cmake
# LLVM_FOUND
# LLVM_INCLUDE_DIRS
# LLVM_LIBRARIES
# LLVM_LIBDIRS
set(LLVM_CONFIG_ERROR_MESSAGES "")
unset(LLVM_CONFIG_EXE CACHE)
find_program(LLVM_CONFIG_EXE
NAMES llvm-config NAMES_PER_DIR
)