Skip to content

Instantly share code, notes, and snippets.

@hoyhoy
hoyhoy / llvm_two_stage_build.sh
Last active November 28, 2025 02:51
LLVM 21.1.6 Two Stage Build Script for MacOS 15.7
#!/usr/bin/env bash
# Bash script to complile LLVM
# @hoyhoy
# 11/18/2025
# Installs to /opt/llvm-${LLVM_VERSION} i.e. /opt/llvm-21.1.6
# and then symbolically link /opt/llvm-latest to /opt/llvm-21.1.6
@hoyhoy
hoyhoy / gist:895bb851efa3b1cffbb424a54cce22e2
Last active September 5, 2025 16:11
llvm-bootstrap-x86_64-apple-darwin24.6.0.sh
#!/opt/bin/bash
set -e
BUILD_DIR=build-$(date +%Y-%m-%d-%I-%M-%S)
# BUILD_DIR=build-2025-04-02-06-18-06
echo BUILD_DIR=${BUILD_DIR}
# BUILD_DIR=build-2024-04-19-01-09-40
# mkdir ${BUILD_DIR}
@hoyhoy
hoyhoy / llvmorg-21.1.0.diff
Created September 1, 2025 19:05
llvmorg on x86_64-apple-darwin24.6.0
diff --git a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
index ca45d7bd2af7..5b04aaf2c2c1 100644
--- a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
+++ b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
@@ -21,7 +21,7 @@ if(APPLE)
set(ARM64 arm64)
set(ARM32 armv7 armv7s armv7k)
set(ARM64_32 arm64_32)
- set(X86_64 x86_64 x86_64h)
+ set(X86_64 x86_64)
@hoyhoy
hoyhoy / build-llvm.sh
Last active December 15, 2024 04:35
Script to Build LLVM 19 on x86_64 macOS 15
#!/bin/sh
set -e
BUILD_DIR=build-$(date +%Y-%m-%d-%I-%M-%S)
echo BUILD_DIR=${BUILD_DIR}
# BUILD_DIR=build-2024-04-19-01-09-40
mkdir ${BUILD_DIR}
LLVM_VERSION_MAJOR=19
// ******************************************************************
// # @hoyhoy - 04/12/2024
// ******************************************************************
// ******************************************************************
// # CMakeLists.txt
// ******************************************************************
// cmake_minimum_required(VERSION 3.29)
// project(stdout_failure)
// enable_testing()
@hoyhoy
hoyhoy / default.j2
Last active July 15, 2025 11:24
Compiler Address Sanitizer, Memory Sanitizer, Thread Sanitizer and Ccache Using Jinja2-enabled profiles with Conan 2.0.
{# █████████████████████████████████████████████████████████████████ #}
{# █ @hoyhoy - 1/12/2024 █ #}
{# █████████████████████████████████████████████████████████████████ #}
{# █ Jinja2 Profile Example to Auto-generate Compiler Sanitizer █ #}
{# █ Flags for a custom llvm build on MacOS and Linux █ #}
{# █████████████████████████████████████████████████████████████████ #}
{# ██████████████████████████████████████████████████████████████████ #}
{# █ $CONAN_HOME/profiles/common/clang_local.j2 █ #}
@hoyhoy
hoyhoy / adhosts2privoxy.conf
Created November 25, 2023 05:01
macOS Launch Daemon to Automatically Update StevenBlack's Host List and Convert to Privoxy Format and Restart Privoxy
[Ad Hosts]
# /usr/local/sbhosts/adhosts2privoxy.conf
File=/etc/hosts
Keep=1
Type=hosts
Encoding=UTF-8