Giter Club home page Giter Club logo

bfc's Introduction

An optimising compiler for brainfuck

Crate version codecov

bfc is an industrial grade compiler for brainfuck. It can:

  • compile (and cross-compile) BF programs to executables
  • optimise runtime speed
  • optimise runtime memory usage
  • optimise executable size
  • show syntax errors with highlighting of the offending source code
  • show warnings with highlighting of the offending source code

To learn more: http://bfc.wilfred.me.uk

bfc's People

Contributors

alexmanno avatar birkenfeld avatar bjorn3 avatar dependabot[bot] avatar petevine avatar tomjakubowski avatar wilfred avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bfc's Issues

Fellowship of compilers

I'd like to alert you to the fact your little compiler has probably exposed a bug in rustc. On the off-chance it's actually a bug in bfc I'll paste it here again:

(gdb) run
Starting program: /tmp/bfc-master/target/release/bfc --opt=0 sample_programs/bangbang.bf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x7f64132c in thread_rng::h22bece718b8c83adkgf ()
(gdb) bt
#0  0x7f64132c in thread_rng::h22bece718b8c83adkgf ()
#1  0x7f640e80 in util::tmpname::h63004644db7838bePja ()
#2  0x7f6405b4 in named::NamedTempFile::new::hf574b1818cd79e23cqa ()
#3  0x7f61c57c in compile_file::hc6fd56a2fad65078FHc ()
#4  0x7f620a44 in main::h51705057b085c902XRc ()
#5  0x7f65948c in sys_common::unwind::try::try_fn::h15347629866114009016 ()
#6  0x7f6561b0 in __rust_try ()
#7  0x7f658ff8 in rt::lang_start::hc182d4243c0ca773kmy ()
#8  0xb6d61632 in __libc_start_main (main=0x7f621f20 <main>, argc=3, argv=0xbeffef74, 
    init=<optimized out>, fini=0x80048e69 <__libc_csu_fini>, rtld_fini=0xb6fea4c5 <_dl_fini>, 
    stack_end=0xbeffef74) at libc-start.c:287
#9  0x7f61ab50 in _start ()

Now, this crash happens to me on ARM, only with a jemalloc enabled rustc. I normally use rustc builds that rely on pure system allocation so I had no idea the problem was there.

Do you think the cause could be narrowed down?

Missing License

Please include a license. It is for people to know what they need to do to use your code.

bfc does not compile on ARM

The issue I've been tracking from the beginning says hullo:

 Compiling bfc v1.3.0 (file:///tmp/bfc-master)
src/llvm.rs:44:38: 44:49 error: mismatched types:
 expected `*const u8`,
    found `*mut i8`
(expected u8,
    found i8) [E0308]
src/llvm.rs:44         let llvm_ir = CStr::from_ptr(llvm_ir_ptr);
                                                    ^~~~~~~~~~~
src/llvm.rs:44:38: 44:49 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to previous error
Could not compile `bfc`.

Also, please update tempfile in Cargo.toml due to the same issue.

Max cell index

A way to change the max cell index from the command line would be nice even if at build time.

Suppose I wanted to use more than 100,000 is that as straightforward as changing line 22 in src/bounds.rs?

Warnings sent to stdout

Warnings are being sent to stdout
They should be sent to stderr, instead.

Example:
./bfc --dump-llvm a.bf > a.ll

can result in a.ll to have something like "a.bf:59:135 warning: These instructions have no effect." (plus lots of bf instructions)
This will make clang or llc to not compile a.ll.

Compilation time is exponential wrt. source size

Hello! In the context of https://github.com/nicuveo/BFS, I am compiling some pretty big brainf*ck files that exceed 1MB, such as https://raw.githubusercontent.com/nicuveo/BFS/tmp/test/tmp.bf (1.1MB), but bfc takes a very long time to compile them (up to twenty minutes). A simple benchmark (see below) seems to suggest that compilation time is exponential wrt. source size.

I created a simple program that peforms N time the same operation, and ran bfc 10 times for different values of N to get an estimated average compilation time:

time for i in {1..10}; do bfc perf_test_$N.bf; done

N=1, 94K: 0.32s average
N=2, 187K: 3.18s average
N=3, 281K: 26.54s average

I'd be happy to help with a patch if there is an easy workaround, such as disabling some sort of optimiser. Thanks!

Soundness failure

In #11 we saw a soundness test failure in quickcheck on Travis. This is clearly a bug that quickcheck rarely finds. We should identify and fix it.

Take in inputs on multiple lines

Hey, I just wanted to say that it compiled and runs perfectly now!! The only problem I have is that whenever I use commas to take inputs, for some reason no matter how I split up the commas (including if I within the code make it print \n\r), it expects every single input to be on exactly one line of the code.

This is probably just me, but I was wondering if there was a way to avoid this, so that I could take inputs on multiple lines?

Soundness issue in annotate_known_zero

Quickcheck is sometimes finding a soundness issue with this transform:

Example failures:

[PointerIncrement { amount: 29, position: Some(0) }, Loop { body: [Increment { amount: -1, offset: 0, position: None }, PointerIncrement { amount: -1, position: None }, Increment { amount: 2, offset: 0, position: None }, PointerIncrement { amount: 1, position: None }], position: None }, Set { amount: -59, offset: 0, position: Some(0) }, Loop { body: [Increment { amount: -1, offset: 0, position: None }, PointerIncrement { amount: -1, position: None }, Increment { amount: 2, offset: 0, position: None }, PointerIncrement { amount: 1, position: None }], position: None }, Loop { body: [Write { position: Some(0) }, Increment { amount: -2, offset: 0, position: Some(0) }, Loop { body: [Set { amount: 84, offset: 0, position: Some(0) }, PointerIncrement { amount: -44, position: Some(0) }, MultiplyMove { changes: {1: -1}, position: Some(0) }, Set { amount: 17, offset: 0, position: Some(0) }, Read { position: Some(0) }], position: Some(0) }], position: Some(0) }, Loop { body: [Increment { amount: 84, offset: 0, position: Some(0) }, Write { position: Some(0) }, Loop { body: [MultiplyMove { changes: {1: -1}, position: Some(0) }], position: Some(0) }, Read { position: Some(0) }, Write { position: Some(0) }, Set { amount: -65, offset: 0, position: Some(0) }, MultiplyMove { changes: {1: 2, 4: 10}, position: Some(0) }, Read { position: Some(0) }, Loop { body: [PointerIncrement { amount: 1, position: Some(0) }, Loop { body: [MultiplyMove { changes: {1: -1}, position: Some(0) }, Write { position: Some(0) }, Increment { amount: -78, offset: 0, position: Some(0) }], position: Some(0) }, MultiplyMove { changes: {1: -1}, position: Some(0) }, Set { amount: 45, offset: 0, position: Some(0) }, Write { position: Some(0) }, Write { position: Some(0) }, Increment { amount: -90, offset: 0, position: Some(0) }, Write { position: Some(0) }, Increment { amount: 51, offset: 0, position: Some(0) }], position: Some(0) }], position: Some(0) }, MultiplyMove { changes: {4: 10, 1: 2}, position: Some(0) }, Loop { body: [Increment { amount: -1, offset: 0, position: None }, PointerIncrement { amount: -1, position: None }, Increment { amount: 2, offset: 0, position: None }, PointerIncrement { amount: 1, position: None }], position: None }, MultiplyMove { changes: {1: 2, 4: 10}, position: Some(0) }]
[Increment { amount: 15, offset: 0, position: Some(0) }, Set { amount: 95, offset: 0, position: Some(0) }, PointerIncrement { amount: 13, position: Some(0) }, Set { amount: 59, offset: 0, position: Some(0) }, Set { amount: -58, offset: 0, position: Some(0) }, Loop { body: [Increment { amount: -1, offset: 0, position: None }, PointerIncrement { amount: -1, position: None }, Increment { amount: 2, offset: 0, position: None }, PointerIncrement { amount: 1, position: None }], position: None }, Loop { body: [Increment { amount: -1, offset: 0, position: None }, PointerIncrement { amount: -1, position: None }, Increment { amount: 2, offset: 0, position: None }, PointerIncrement { amount: 1, position: None }], position: None }]

The second example can be written in Rust syntax as:

let instrs = vec![
    Increment { amount: Wrapping(15), offset: 0, position: None },
    Set { amount: Wrapping(95), offset: 0, position: None },
    PointerIncrement { amount: 13, position: None },
    Set { amount: Wrapping(59), offset: 0, position: None },
    Set { amount: Wrapping(-58), offset: 0, position: None },
    Loop { body: vec![Increment { amount: Wrapping(-1), offset: 0, position: None }, PointerIncrement { amount: -1, position: None }, Increment { amount: Wrapping(2), offset: 0, position: None }, PointerIncrement { amount: 1, position: None }], position: None },
    Loop { body: vec![Increment { amount: Wrapping(-1), offset: 0, position: None }, PointerIncrement { amount: -1, position: None }, Increment { amount: Wrapping(2), offset: 0, position: None }, PointerIncrement { amount: 1, position: None }], position: None }
];

This is sometimes reproducible with the following command:

$ QUICKCHECK_TESTS=50000 cargo t known_zero_is

error: linking with `cc` failed: exit code: 1

After applying the patch in #30, compiling bfc on Rust Nightly failed with the following error:

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/arni/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/sdb/src/bfc/target/release/deps/bfc-f0add497431defa0.bfc.68yv20w5-cgu.1.rcgu.o" "-o" "/sdb/src/bfc/target/release/deps/bfc-f0add497431defa0" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/sdb/src/bfc/target/release/deps" "-L" "/sdb/src/bfc/target/release/build/llvm-sys-618d5069e822bb89/out" "-L" "/usr/lib64/llvm/8/lib64" "-L" "/home/arni/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/rustcW309XL/libllvm_sys-49827d229dc1144f.rlib" "-Wl,--start-group" "/tmp/rustcW309XL/libbacktrace_sys-42efa7527d5e3bf5.rlib" "-Wl,--end-group" "/home/arni/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-ddcd8f25fdf91ca1.rlib" "-Wl,-Bdynamic" "-lstdc++" "-lutil" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
  = note: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /sdb/src/bfc/target/release/deps/bfc-f0add497431defa0.bfc.68yv20w5-cgu.1.rcgu.o: in function `core::ptr::real_drop_in_place':
          bfc.68yv20w5-cgu.1:(.text._ZN4core3ptr18real_drop_in_place17h82123f8160b6c5caE+0x10): undefined reference to `LLVMDisposeModule'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /sdb/src/bfc/target/release/deps/bfc-f0add497431defa0.bfc.68yv20w5-cgu.1.rcgu.o: in function `core::ptr::real_drop_in_place':
          bfc.68yv20w5-cgu.1:(.text._ZN4core3ptr18real_drop_in_place17h85cfdaedc94080c9E+0x5): undefined reference to `LLVMDisposeBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /sdb/src/bfc/target/release/deps/bfc-f0add497431defa0.bfc.68yv20w5-cgu.1.rcgu.o: in function `bfc::llvm::add_function_call':
          bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm17add_function_call17h104ee4c06528dd64E+0x25): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm17add_function_call17h104ee4c06528dd64E+0x39): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm17add_function_call17h104ee4c06528dd64E+0x60): undefined reference to `LLVMGetNamedFunction'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm17add_function_call17h104ee4c06528dd64E+0x89): undefined reference to `LLVMBuildCall'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm17add_function_call17h104ee4c06528dd64E+0x95): undefined reference to `LLVMDisposeBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /sdb/src/bfc/target/release/deps/bfc-f0add497431defa0.bfc.68yv20w5-cgu.1.rcgu.o: in function `bfc::llvm::compile_instr':
          bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x3e): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x57): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x7c): undefined reference to `LLVMBuildLoad'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x85): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x93): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0xbe): undefined reference to `LLVMBuildAdd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x121): undefined reference to `LLVMBuildGEP'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x149): undefined reference to `LLVMBuildLoad'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x152): undefined reference to `LLVMInt8Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x160): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x18b): undefined reference to `LLVMBuildAdd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x1ce): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x1f8): undefined reference to `LLVMAppendBasicBlock'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x207): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x21b): undefined reference to `LLVMBuildBr'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x23d): undefined reference to `LLVMAppendBasicBlock'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x262): undefined reference to `LLVMAppendBasicBlock'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x27e): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x29e): undefined reference to `LLVMInt8Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x2ab): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x2e0): undefined reference to `LLVMBuildICmp'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x2fc): undefined reference to `LLVMBuildCondBr'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x357): undefined reference to `LLVMAppendBasicBlock'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x360): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x370): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x382): undefined reference to `LLVMBuildBr'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x392): undefined reference to `LLVMGetFirstBasicBlock'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x3b6): undefined reference to `LLVMDisposeBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x420): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x431): undefined reference to `LLVMBuildBr'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x43a): undefined reference to `LLVMDisposeBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x454): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x470): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x495): undefined reference to `LLVMBuildLoad'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x4f2): undefined reference to `LLVMBuildGEP'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x54c): undefined reference to `LLVMInt8Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x577): undefined reference to `LLVMBuildTrunc'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x586): undefined reference to `LLVMBuildStore'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x598): undefined reference to `LLVMDisposeBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x5af): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x5c3): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x5df): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x60a): undefined reference to `LLVMBuildSExt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x68f): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x6a6): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x6cb): undefined reference to `LLVMBuildLoad'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x6d4): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x6e2): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x70d): undefined reference to `LLVMBuildAdd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x71c): undefined reference to `LLVMBuildStore'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x725): undefined reference to `LLVMDisposeBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x74d): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x764): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x789): undefined reference to `LLVMBuildLoad'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x792): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x7a0): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x7cb): undefined reference to `LLVMBuildAdd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x830): undefined reference to `LLVMBuildGEP'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x839): undefined reference to `LLVMInt8Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x849): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x858): undefined reference to `LLVMBuildStore'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x86a): undefined reference to `LLVMDisposeBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x8a5): undefined reference to `LLVMAppendBasicBlock'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x8de): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x8f5): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x91c): undefined reference to `LLVMInt8Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x929): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x95e): undefined reference to `LLVMBuildICmp'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x97a): undefined reference to `LLVMBuildCondBr'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x986): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x98c): undefined reference to `LLVMInt8Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x999): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x9b5): undefined reference to `LLVMBuildStore'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x1530): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x153e): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x1594): undefined reference to `LLVMBuildGEP'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x15bc): undefined reference to `LLVMBuildLoad'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x17dc): undefined reference to `LLVMInt8Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x17ea): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x1822): undefined reference to `LLVMBuildMul'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x184f): undefined reference to `LLVMBuildAdd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x185e): undefined reference to `LLVMBuildStore'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x18ec): undefined reference to `LLVMBuildBr'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm13compile_instr17h753e580e4dcbe698E+0x18f5): undefined reference to `LLVMDisposeBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /sdb/src/bfc/target/release/deps/bfc-f0add497431defa0.bfc.68yv20w5-cgu.1.rcgu.o: in function `bfc::llvm::add_current_cell_access':
          bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm23add_current_cell_access17h33f9e5b1ab5855c2E+0x1b): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm23add_current_cell_access17h33f9e5b1ab5855c2E+0x2e): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm23add_current_cell_access17h33f9e5b1ab5855c2E+0x51): undefined reference to `LLVMBuildLoad'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm23add_current_cell_access17h33f9e5b1ab5855c2E+0xac): undefined reference to `LLVMBuildGEP'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm23add_current_cell_access17h33f9e5b1ab5855c2E+0xd2): undefined reference to `LLVMBuildLoad'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4llvm23add_current_cell_access17h33f9e5b1ab5855c2E+0xe7): undefined reference to `LLVMDisposeBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /sdb/src/bfc/target/release/deps/bfc-f0add497431defa0.bfc.68yv20w5-cgu.1.rcgu.o: in function `core::ptr::real_drop_in_place':
          bfc.68yv20w5-cgu.1:(.text._ZN4core3ptr18real_drop_in_place17hfef15036a16516b4E+0x5): undefined reference to `LLVMDisposeTargetMachine'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /sdb/src/bfc/target/release/deps/bfc-f0add497431defa0.bfc.68yv20w5-cgu.1.rcgu.o: in function `bfc::main':
          bfc.68yv20w5-cgu.1:(.text._ZN3bfc4main17h3d1dae9e40f402c1E+0x86a): undefined reference to `LLVMGetDefaultTargetTriple'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc4main17h3d1dae9e40f402c1E+0x8b4): undefined reference to `LLVMDisposeMessage'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /sdb/src/bfc/target/release/deps/bfc-f0add497431defa0.bfc.68yv20w5-cgu.1.rcgu.o: in function `bfc::compile_file':
          bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2bf3): undefined reference to `LLVMModuleCreateWithName'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2ca5): undefined reference to `LLVMGetDefaultTargetTriple'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2ceb): undefined reference to `LLVMDisposeMessage'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2d1d): undefined reference to `LLVMSetTarget'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2d23): undefined reference to `LLVMVoidType'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2d2d): undefined reference to `LLVMInt8Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2d3a): undefined reference to `LLVMPointerType'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2d51): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2d63): undefined reference to `LLVMInt1Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2d8e): undefined reference to `LLVMFunctionType'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2dbe): undefined reference to `LLVMAddFunction'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2dc4): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2dce): undefined reference to `LLVMInt8Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2dd9): undefined reference to `LLVMPointerType'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2dec): undefined reference to `LLVMFunctionType'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2e1f): undefined reference to `LLVMAddFunction'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2e25): undefined reference to `LLVMInt8Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2e30): undefined reference to `LLVMPointerType'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2e47): undefined reference to `LLVMFunctionType'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2e7a): undefined reference to `LLVMAddFunction'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2e86): undefined reference to `LLVMInt8Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2e91): undefined reference to `LLVMPointerType'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2ebb): undefined reference to `LLVMFunctionType'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2eee): undefined reference to `LLVMAddFunction'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2f0b): undefined reference to `LLVMFunctionType'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2f3e): undefined reference to `LLVMAddFunction'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2f44): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2f56): undefined reference to `LLVMFunctionType'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x2f89): undefined reference to `LLVMAddFunction'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3005): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3017): undefined reference to `LLVMFunctionType'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x304a): undefined reference to `LLVMAddFunction'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3072): undefined reference to `LLVMAppendBasicBlock'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x30a7): undefined reference to `LLVMAppendBasicBlock'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x30e1): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3102): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x317a): undefined reference to `LLVMInt8Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3188): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x32b8): undefined reference to `LLVMInt8Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x32c8): undefined reference to `LLVMArrayType'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x32db): undefined reference to `LLVMConstArray'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x330e): undefined reference to `LLVMAddGlobal'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x331d): undefined reference to `LLVMSetInitializer'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x332b): undefined reference to `LLVMSetGlobalConstant'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3332): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3348): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3366): undefined reference to `LLVMInt8Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3371): undefined reference to `LLVMPointerType'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x33a4): undefined reference to `LLVMBuildPointerCast'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3414): undefined reference to `LLVMDisposeBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x343b): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x345f): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3465): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3473): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x34e7): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x34ee): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3508): undefined reference to `LLVMInt1Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x359d): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x35b1): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x35bd): undefined reference to `LLVMBuildBr'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x38e2): undefined reference to `LLVMInt8Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x38f1): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3903): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x39a2): undefined reference to `LLVMBuildGEP'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3afa): undefined reference to `LLVMDisposeBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3b00): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3b13): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3b19): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3b44): undefined reference to `LLVMBuildAlloca'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3b4d): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3b60): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3b6f): undefined reference to `LLVMBuildStore'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3b78): undefined reference to `LLVMDisposeBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3bf4): undefined reference to `LLVMAppendBasicBlock'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3c05): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3c1a): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3c2a): undefined reference to `LLVMBuildBr'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3c36): undefined reference to `LLVMGetFirstBasicBlock'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3c51): undefined reference to `LLVMDisposeBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3cba): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3cd9): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3d53): undefined reference to `LLVMDisposeBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3d59): undefined reference to `LLVMCreateBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3d68): undefined reference to `LLVMPositionBuilderAtEnd'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3d6e): undefined reference to `LLVMInt32Type'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3d7b): undefined reference to `LLVMConstInt'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3d87): undefined reference to `LLVMBuildRet'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3d90): undefined reference to `LLVMDisposeBuilder'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3e3b): undefined reference to `LLVMPrintModuleToString'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x3eba): undefined reference to `LLVMDisposeMessage'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x41de): undefined reference to `LLVMPassManagerBuilderCreate'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x41ec): undefined reference to `LLVMPassManagerBuilderSetOptLevel'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x41f2): undefined reference to `LLVMCreatePassManager'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x4201): undefined reference to `LLVMPassManagerBuilderPopulateModulePassManager'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x420a): undefined reference to `LLVMPassManagerBuilderDispose'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x4219): undefined reference to `LLVMRunPassManager'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x4234): undefined reference to `LLVMDisposePassManager'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x4edb): undefined reference to `LLVMGetTarget'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x4f12): undefined reference to `LLVMGetTargetFromTriple'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x4fdc): undefined reference to `LLVMCreateTargetMachine'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x5071): undefined reference to `LLVMTargetMachineEmitToFile'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x5082): undefined reference to `LLVMDisposeTargetMachine'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x53f5): undefined reference to `LLVMDisposeModule'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: bfc.68yv20w5-cgu.1:(.text._ZN3bfc12compile_file17hb8448e8f8ebb9e9bE+0x5be5): undefined reference to `LLVMDisposeModule'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/rustcW309XL/libllvm_sys-49827d229dc1144f.rlib(target.o): in function `LLVM_InitializeAllTargetInfos':
          target.c:(.text.LLVM_InitializeAllTargetInfos+0x5): undefined reference to `LLVMInitializeNVPTXTargetInfo'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: target.c:(.text.LLVM_InitializeAllTargetInfos+0xa): undefined reference to `LLVMInitializeBPFTargetInfo'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: target.c:(.text.LLVM_InitializeAllTargetInfos+0xf): undefined reference to `LLVMInitializeAMDGPUTargetInfo'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: target.c:(.text.LLVM_InitializeAllTargetInfos+0x18): undefined reference to `LLVMInitializeX86TargetInfo'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/rustcW309XL/libllvm_sys-49827d229dc1144f.rlib(target.o): in function `LLVM_InitializeAllTargets':
          target.c:(.text.LLVM_InitializeAllTargets+0x5): undefined reference to `LLVMInitializeNVPTXTarget'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: target.c:(.text.LLVM_InitializeAllTargets+0xa): undefined reference to `LLVMInitializeBPFTarget'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: target.c:(.text.LLVM_InitializeAllTargets+0xf): undefined reference to `LLVMInitializeAMDGPUTarget'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: target.c:(.text.LLVM_InitializeAllTargets+0x18): undefined reference to `LLVMInitializeX86Target'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/rustcW309XL/libllvm_sys-49827d229dc1144f.rlib(target.o): in function `LLVM_InitializeAllTargetMCs':
          target.c:(.text.LLVM_InitializeAllTargetMCs+0x5): undefined reference to `LLVMInitializeNVPTXTargetMC'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: target.c:(.text.LLVM_InitializeAllTargetMCs+0xa): undefined reference to `LLVMInitializeBPFTargetMC'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: target.c:(.text.LLVM_InitializeAllTargetMCs+0xf): undefined reference to `LLVMInitializeAMDGPUTargetMC'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: target.c:(.text.LLVM_InitializeAllTargetMCs+0x18): undefined reference to `LLVMInitializeX86TargetMC'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/rustcW309XL/libllvm_sys-49827d229dc1144f.rlib(target.o): in function `LLVM_InitializeAllAsmPrinters':
          target.c:(.text.LLVM_InitializeAllAsmPrinters+0x5): undefined reference to `LLVMInitializeNVPTXAsmPrinter'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: target.c:(.text.LLVM_InitializeAllAsmPrinters+0xa): undefined reference to `LLVMInitializeBPFAsmPrinter'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: target.c:(.text.LLVM_InitializeAllAsmPrinters+0xf): undefined reference to `LLVMInitializeAMDGPUAsmPrinter'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: target.c:(.text.LLVM_InitializeAllAsmPrinters+0x18): undefined reference to `LLVMInitializeX86AsmPrinter'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/rustcW309XL/libllvm_sys-49827d229dc1144f.rlib(target.o): in function `LLVM_InitializeAllAsmParsers':
          target.c:(.text.LLVM_InitializeAllAsmParsers+0x5): undefined reference to `LLVMInitializeBPFAsmParser'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: target.c:(.text.LLVM_InitializeAllAsmParsers+0xa): undefined reference to `LLVMInitializeAMDGPUAsmParser'
          /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: target.c:(.text.LLVM_InitializeAllAsmParsers+0x13): undefined reference to `LLVMInitializeX86AsmParser'
          collect2: error: ld returned 1 exit status


error: aborting due to previous error

error: could not compile `bfc`.

cannot use `state` because it was mutably borrowed

When attempting to build bfc with Rust Nightly, I got this error:

error[E0503]: cannot use `state` because it was mutably borrowed
    --> /home/arni/.cargo/registry/src/github.com-1ecc6299db9ec823/getopts-0.2.14/src/lib.rs:1008:33
     |
955  |     let mut machine = |cont: &mut bool, (i, c): (usize, char)| {
     |                       ---------------------------------------- borrow of `state` occurs here
...
959  |         state = match (state, whitespace, limit) {
     |                        ----- borrow occurs due to use of `state` in closure
...
1008 |     while cont && match state { B | C => true, A => false } {
     |                                 ^ use of borrowed `state`
1009 |         machine(&mut cont, (fake_i, ' '));
     |         ------- borrow later used here

error: aborting due to previous error

For more information about this error, try `rustc --explain E0503`.
error: could not compile `getopts`.

It went away when the dependencies were updated:

diff --git a/Cargo.lock b/Cargo.lock
index b4d0624..4e4dec8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,183 +1,215 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
 [[package]]
 name = "aho-corasick"
-version = "0.5.2"
+version = "0.7.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
+ "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
-name = "aho-corasick"
-version = "0.6.10"
+name = "ansi_term"
+version = "0.12.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
-[[package]]
-name = "ansi_term"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
 [[package]]
 name = "bfc"
 version = "1.7.0"
 dependencies = [
- "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "itertools 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)",
- "llvm-sys 80.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "quickcheck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "tempfile 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "llvm-sys 80.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "c2-chacha"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "cc"
-version = "1.0.29"
+version = "1.0.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "cfg-if"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "either"
+version = "1.5.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "env_logger"
-version = "0.3.4"
+version = "0.6.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.1.73 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "getopts"
-version = "0.2.14"
+version = "0.2.21"
 source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+]
 
 [[package]]
-name = "itertools"
-version = "0.4.18"
+name = "getrandom"
+version = "0.1.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
 
 [[package]]
-name = "kernel32-sys"
-version = "0.2.2"
+name = "itertools"
+version = "0.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "lazy_static"
-version = "1.2.0"
+version = "1.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "libc"
-version = "0.2.15"
+version = "0.2.62"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "llvm-sys"
-version = "80.1.0"
+version = "80.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)",
- "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "log"
-version = "0.3.6"
+version = "0.4.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+]
 
 [[package]]
 name = "matches"
-version = "0.1.2"
+version = "0.1.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "memchr"
-version = "0.1.11"
+version = "2.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
-]
 
 [[package]]
-name = "memchr"
-version = "2.2.0"
+name = "ppv-lite86"
+version = "0.2.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "quickcheck"
-version = "0.3.1"
+version = "0.9.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "rand"
-version = "0.3.14"
+version = "0.7.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
-name = "regex"
-version = "0.1.73"
+name = "rand_chacha"
+version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "aho-corasick 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex-syntax 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "thread_local 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
-name = "regex"
-version = "1.1.0"
+name = "rand_core"
+version = "0.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
-name = "regex-syntax"
-version = "0.3.4"
+name = "rand_hc"
+version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
 
 [[package]]
-name = "regex-syntax"
-version = "0.6.5"
+name = "redox_syscall"
+version = "0.1.56"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
-]
 
 [[package]]
-name = "rustc_version"
-version = "0.1.7"
+name = "regex"
+version = "1.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
+ "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
-name = "semver"
-version = "0.1.20"
+name = "regex-syntax"
+version = "0.6.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "remove_dir_all"
+version = "0.5.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
 
 [[package]]
 name = "semver"
@@ -194,31 +226,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "tempfile"
-version = "2.1.4"
+version = "3.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "thread-id"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "thread_local"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
+ "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -226,66 +242,71 @@ name = "thread_local"
 version = "0.3.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
-name = "ucd-util"
-version = "0.1.3"
+name = "unicode-width"
+version = "0.1.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
-name = "utf8-ranges"
-version = "0.1.3"
+name = "wasi"
+version = "0.7.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
-name = "utf8-ranges"
-version = "1.0.2"
+name = "winapi"
+version = "0.3.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
 
 [[package]]
-name = "winapi"
-version = "0.2.8"
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
-name = "winapi-build"
-version = "0.1.1"
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [metadata]
-"checksum aho-corasick 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2b3fb52b09c1710b961acb35390d514be82e4ac96a9969a8e38565a29b878dc9"
-"checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5"
-"checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6"
-"checksum cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)" = "4390a3b5f4f6bce9c1d0c00128379df433e53777fdd30e92f16a529332baec4e"
-"checksum env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "82dcb9ceed3868a03b335657b85a159736c961900f7e7747d3b0b97b9ccb5ccb"
-"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
-"checksum itertools 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)" = "6f15d694e7f7d46ef7a6951db981b33f132472f91d11b5a0f44d3980b87ccbc3"
-"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
-"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1"
-"checksum libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "23e3757828fa702a20072c37ff47938e9dd331b92fac6e223d26d4b7a55f7ee2"
-"checksum llvm-sys 80.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b9dcaea5f4dfe861b2b514bbf7b19176f1f1f5f4fd3097c55a7dfbf07da7105a"
-"checksum log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054"
-"checksum matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "15305656809ce5a4805b1ff2946892810992197ce1270ff79baded852187942e"
-"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20"
-"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39"
-"checksum quickcheck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ee4649d5e823e7a9e5a128a6bfa884e132f93668c64274d865d9f94a0f2574ca"
-"checksum rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "2791d88c6defac799c3f20d74f094ca33b9332612d9aef9078519c82e4fe04a5"
-"checksum regex 0.1.73 (registry+https://github.com/rust-lang/crates.io-index)" = "56b7ee9f764ecf412c6e2fff779bca4b22980517ae335a21aeaf4e32625a5df2"
-"checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f"
-"checksum regex-syntax 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "31040aad7470ad9d8c46302dcffba337bb4289ca5da2e3cd6e37b64109a85199"
-"checksum regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8c2f35eedad5295fdf00a63d7d4b238135723f92b434ec06774dad15c7ab0861"
-"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084"
-"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac"
+"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d"
+"checksum ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
+"checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101"
+"checksum cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "4fc9a35e1f4290eb9e5fc54ba6cf40671ed2a2514c3eeb2b2a908dda2ea5a1be"
+"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
+"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
+"checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3"
+"checksum getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5"
+"checksum getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571"
+"checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358"
+"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+"checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba"
+"checksum llvm-sys 80.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2110cd4daf9cd8e39dd3b933b1a2a2ac7315e91f7c92b3a20beab526c63b5978"
+"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
+"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
+"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e"
+"checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b"
+"checksum quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d5ca504a2fdaa08d3517f442fbbba91ac24d1ec4c51ea68688a038765e3b2662"
+"checksum rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412"
+"checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853"
+"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
+"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
+"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
+"checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd"
+"checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716"
+"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e"
 "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
 "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
-"checksum tempfile 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9270837a93bad1b1dac18fe67e786b3c960513af86231f6f4f57fddd594ff0c8"
-"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03"
-"checksum thread_local 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "55dd963dbaeadc08aa7266bf7f91c3154a7805e32bb94b820b769d2ef3b4744d"
+"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
 "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
-"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86"
-"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f"
-"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737"
-"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
-"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
+"checksum unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7007dbd421b92cc6e28410fe7362e2e0a2503394908f417b68ec8d1c364c4e20"
+"checksum wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d"
+"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
+"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
diff --git a/Cargo.toml b/Cargo.toml
index 24b1772..a50c26e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,11 +9,11 @@ readme = "README.md"
 license = "GPL-2.0"
 
 [dependencies]
-llvm-sys = "80"
-itertools = "0.4"
-rand = "0.3"
-quickcheck = "0.3"
-tempfile = "2.1"
-getopts = "0.2"
-matches = "0.1"
-ansi_term = "0.9"
+llvm-sys = "80.1.1"
+itertools = "0.8.0"
+rand = "0.7.2"
+quickcheck = "0.9.0"
+tempfile = "3.1.0"
+getopts = "0.2.21"
+matches = "0.1.8"
+ansi_term = "0.12.1"

Compiling factor.bf returns incorrect results with full optimisations

$ ./bfc14 --opt 0 sample_programs/factor.bf
$ echo 1333337 | ./factor
1333337: 617 2161
$ ./bfc14 --opt 1 sample_programs/factor.bf
$ echo 1333337 | ./factor
1333337: 1333337

# minimal bad passes
cargo run -- --passes=multiply,zeroing_loop --opt=1 --llvm-opt=2 sample_programs/factor.bf

Panic compiling fizzbuzz.bf

All examples compile fine except for fizzbuzz.bf, which fails with:

thread '<main>' panicked at 'index out of bounds: the len is 3 but the index is 10', src/libcollections/vec.rs:1110

or

thread '<main>' panicked at 'index out of bounds: the len is 3 but the index is 10', src/libcollections/vec.rs:1035

depending on the custom built target architecture i586 or i686-unknown-linux-gnu respectively.

I'm on 32-bit Linux, using nightly rust and llvm 3.7

Output corrupted and messages lost

Because errors and warnings are being sent out the standard output like a neophyte.

Obviously, any real industrial grade software sends them out the standard error.

PS: Also terminal control sequences should only be sent to a TERMINAL.

Can this become a library on crates.io?

I was wondering if this could be a library on crates.io with docs on docs.rs so that other rust developers can use this in their projects.

One of my projects (the wright programming language) is a language that could potentially benifit from targetting brainfuck as an itermediate, and I would like to use your compiler in the process.

cargo build --release returns errors E0503 and E0592 (cannot use `state` because it was mutably borrowed)

Hi, this project looks amazing!! I wanted to see whether I could make some cool and pretty fast bf programs with it, but I'm not really familiar with rust or LLVM, so I just followed the instructions you gave in building the files. However after running cargo build --release, I received the errors in the title - I also tried running cmd with administrator, but since I don't really know anything about the languages that was pretty much all I could do. Would you have any idea what would cause this?

PS - If you actually reply, that'll be so awesome, since it will mean you will still be looking at this github page after 4 years!! Dedication and a half.

Mangled output of ANSI escape sequences in v1.11.0 and master branch

I am sorry that I can't think of a better way to put this, but bfc installed with cargo install --git (tested with both the master branch and tag 1.11.0) mangles the output of a program I wrote.

My program's output should be a mix of ANSI escape sequences and whitespace that look like the following:
image

Instead, I get this:

image

Testing the same code with a different compiler (specifically ebfc from ELFkickers 3.2) and 2 interpreters (beef and one rather slow one I created myself and have not yet released publicly) have the expected output. Additionally, older versions of bfc work as expected. I installed version 1.10.0 with the command cargo install --git https://github.com/Wilfred/bfc.git --tag 1.10.0 and that worked properly.

In case it is helpful, the code for my colortest.bf program is here.

I have an asciinema recording comparing the output of bfc with the other compiler and interpreters which can be viewed here

"Pass is not initialized" on LLVM 8

Pass 'Interprocedural Sparse Conditional Constant Propagation' is not initialized.
Verify if there is a pass dependency cycle.
Required Passes:
Segmentation fault: 11

Even when I updated llvm-sys to v80, it just crashes.

Possible additions

OK so before you say that this isn't brainfuck if you add more, i know it isn't, but you could make a subset which adds all this (maybe barefuck, idk)

OK so basically my idea was for there to be more features so that we could write the esoteric OS described on the esolang wiki (https://bit.ly/2GiXKxb) in an esoteric language.

The things I think we would need to implement (some are just to make things slightly easier but still)

  • Inline assembly - Possibly inbetween a and z command? Though this may be problematic.
  • Ability to push and pop from the stack - Maybe from a ^ for push and a v for pop
  • Ability to create a static lib with labels and ability to call other labels - While this would basically implement functions, it would be nessesary for creating an OS

Also, maybe just to keep it a regular bf compiler aswell, you would have to specify an option for it to use this subset.

I know there is little chance that this suggestion will be considered, but it's worth a try :P

Core dump in LLVMBuildCall

As I'm writing my own BF compiler I wanted to compare and benchmark against existing implementations. Unfortunately I cannot get this to run (using the current stable rust 1.67.0):

$ target/debug/bfc sample_programs/life.bf 
zsh: segmentation fault (core dumped)  target/debug/bfc sample_programs/life.bf

Analysing in gdb shows the following backtrace:

(gdb) bt
#0  0x00005555575e31af in LLVMBuildCall ()
#1  0x0000555555cc5ff5 in bfc::llvm::add_function_call (module=0x7fffffffc6d8, bb=0x55555b3dc5c0, fn_name="write", args=&mut [*mut llvm_sys::LLVMValue](size=3) = {...}, name="")
    at src/llvm.rs:203
#2  0x0000555555cc93d8 in bfc::llvm::compile_static_outputs (module=0x7fffffffc6d8, bb=0x55555b3dc5c0, outputs=&[i8](size=133) = {...}) at src/llvm.rs:789
#3  0x0000555555cc96cc in bfc::llvm::compile_to_module (module_name="sample_programs/life.bf", target_triple=..., instrs=&[bfc::bfir::AstNode](size=8) = {...}, initial_state=0x7fffffffc3a8)
    at src/llvm.rs:833
#4  0x0000555555cbf5d6 in bfc::compile_file (matches=0x7fffffffccd0) at src/main.rs:174
#5  0x0000555555cc0f73 in bfc::main () at src/main.rs:299

strip behave different for linux and mac

-s flag for strip command behave different for linux and mac.

In mac, strip -s hello_word will cause

fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: no files specified

bfc hangs due to compile-time evaluation

I am trying to compile the following code with bfc -O2:
. + [[ [[ >. [+ [<>]]] >]<>+ .]>< ,-.,,+++[]---]

But it shows warning:

24852.bf:1:26 warning: This instruction moves the pointer after the last cell (99999), to cell 100000.
  . + [[ [[ >. [+ [<>]]] >]<>+ .]>< ,-.,,+++[]---]
                         ^

But no exit. It should fall into some infinite loop or similar things.

Segfault due to incorrect target

Supplying an incorrect target results in a segfault:

target/release/bfc --target=x86-linux-gnu sample_programs/hello_world.bf

Program received signal SIGSEGV, Segmentation fault.
0x80ec7ab5 in LLVMCreateTargetMachine ()
(gdb) bt
#0  0x80ec7ab5 in LLVMCreateTargetMachine ()
#1  0x00000000 in ?? ()

That's probably just a usability tweak as clang would print an error too:

clang: error: unsupported option '--triple=x86-linux-gnu'

Linker fails

I'm running the integration tests, and the linker fails for each file. Here's the message I'm getting.

/usr/bin/ld: /tmp/.tmpjUJ2R4: relocation R_X86_64_32 against symbol 'known_outputs' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: final link failed: nonrepresentable section on output clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)

I hope this is enough information. I don't know if I can fix this myself.

Beautiful Project!

Sorry for writing that here, but this project is a piece of art!!!! Congratulations!!! For sure I will use your posts to improve my language(Brain) even more!!! Thanks!

Spurious warning when compiling mandelbrot

sample_programs/mandelbrot.bf:20:29 warning: This multiply loop tried to access cell -16 (offset -36 from current cell 20)
<]<+<<<<<<<<<]>>>>>>>>>[>>>>[-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.