Skip to content

Instantly share code, notes, and snippets.

View androm3da's full-sized avatar

Brian Cain androm3da

View GitHub Profile
#!/bin/bash
set -euo pipefail
echo creating init file
echo <<EOF > input.S
.section .text
EOF
echo '' > keep_syms.txt
for i in $(seq 0 100000)
@androm3da
androm3da / Dockerfile
Last active January 5, 2020 22:40
ubuntu docker build clang
FROM ubuntu:16.04
VOLUME ['/tmp/']
RUN apt-get update && apt-get install -y --force-yes build-essential subversion chrpath wget file python python-virtualenv cmake ninja-build tar tcl && \
cd /tmp && \
wget --quiet https://raw.githubusercontent.com/llvm/llvm-project/master/llvm/utils/release/test-release.sh && \
wget --quiet https://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz && \
tar xf clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz && \
chmod +x test-release.sh && \
/usr/bin/env CXX=/tmp/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang++ \
+ mkdir obj_target_v60_83latest_test-suite
+ cd obj_target_v60_83latest_test-suite
+ cmake -GNinja -DCMAKE_C_COMPILER=hexagon-linux-clang -DCMAKE_CXX_COMPILER=hexagon-linux-clang++ -C/local/mnt/workspace/testing/test-suite/cmake/caches/O0.cmake -DTEST_SUITE_EXTRA_C_FLAGS=-mv60 -DTEST_SUITE_EXTRA_CXX_FLAGS=-mv60 -DTEST_SUITE_EXTRA_EXE_LINKER_FLAGS=-mv60 -DARCH:STRING=Hexagon -DTEST_SUITE_CXX_ABI_LIBNAME:STRING=libc++abi -DBENCHMARK_USE_LIBCXX:BOOL=ON -DTEST_SUITE_REMOTE_CLIENT:STRING=ssh -DTEST_SUITE_REMOTE_HOST:STRING=aus-dragon820-05 -DTEST_SUITE_LIT_FLAGS:STRING=-vj4 -DFP_TOLERANCE:STRING=1.5 -DFP_ABSTOLERANCE:STRING=1.5 /local/mnt/workspace/testing/test-suite
loading initial cache file /local/mnt/workspace/testing/test-suite/cmake/caches/O0.cmake
-- The C compiler identification is Clang 7.0.0
-- The CXX compiler identification is Clang 7.0.0
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info -
#!/bin/bash -x
set -euo pipefail
test_suite=$(readlink -f ${1-../test-suite/})
PATH=/prj/dsp/qdsp6/release/internal/HEXAGON/branch-8.4lnx/latest/Tools/bin:$PATH
qemu=~bcain/src/hexagon-clang/qemu.sh
Q6_ARCH=v65
opt=O0
flavor=qemu_${Q6_ARCH}_84latest_${opt}
#!/bin/bash -x
# Run the llvm test-suite on target (v60)
set -euo pipefail
Q6_ARCH=v60
test_suite=$(readlink -f ${1})
PATH=/prj/dsp/qdsp6/release/internal/HEXAGON/branch-8.3lnx/latest/Tools/bin:$PATH
flavor=target_${Q6_ARCH}_83latest
+ stage=1
+ ./x.py build --stage 1 -vvvv --config ../hexagon-linux-83.toml src/liblibc
running: /local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /local/mnt/workspace/rust/rust/src/bootstrap/Cargo.toml --verbose --verbose --verbose
Fresh unicode-xid v0.1.0
Fresh cc v1.0.35
Fresh ordermap v0.3.5
Fresh unicode-width v0.1.5
Fresh cfg-if v0.1.8
Fresh itoa v0.4.4
Fresh fixedbitset v0.1.9
+ stage=1
+ ./x.py build --stage 1 -vvvv --config ../hexagon-linux-83.toml src/liblibc
running: /local/mnt/workspace/rust/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /local/mnt/workspace/rust/rust/src/bootstrap/Cargo.toml --verbose --verbose --verbose
Fresh unicode-xid v0.1.0
Fresh cc v1.0.35
Fresh ordermap v0.3.5
Fresh unicode-width v0.1.5
Fresh cfg-if v0.1.8
Fresh itoa v0.4.4
Fresh fixedbitset v0.1.9
@androm3da
androm3da / cycle_test.py
Last active January 25, 2018 01:24
Raiblocks startup/shutdown test
#!/usr/bin/env python
# requires a 'restart_test_reference.json'
# requires `requests` module, e.g.
# requires a sample database to start with
# 'touch data.ldb' should probably work if none is avail
#
# virtualenv xrb_test
# source xrb_test/bin/activate
# pip install requests
#!/usr/bin/env python
"""mergelog
This is a custom merge driver for git for the libcxx repo. It should be called from git
with a stanza in .git.config like this:
[merge "mergecxx"]
name = A custom merge driver for libcxx
driver = ~/src/merge_cxx %O %A %B %P
#!/bin/bash -ex
CC="clang"
CXX="clang++"
export PATH=/local/mnt/workspace/install/binutils-2.27/bin:${PATH}
SRCTOP=$(readlink -f ${PWD})
INSTALL=${1-${SRCTOP}/install}
if [[ ! -d ${SRCTOP}/llvm ]]; then
echo Expected to find the source in ${SRCTOP}/llvm but it is missing