Skip to content

Commit

Permalink
Just use the default gcc instead of clang 4.0.0.
Browse files Browse the repository at this point in the history
It was a bit of a flight of fancy to use a pinned version of clang.
This would make sense if we were really depending on hyper-specific
behaviour of the C compiler, like some automatic SIMD parallization,
but in reality we're not. So don't be fussy and just keep it simple.
  • Loading branch information
lukego committed Jan 17, 2018
1 parent b8204d9 commit 4189da6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ build environment. You can use Nix to build/test/benchmark RaptorJIT
with suitable versions of all dependencies provided.

Note: Building with nix will be slow the first time because it
downloads the exact reference versions of the toolchain (clang, etc)
downloads the exact reference versions of the toolchain (gcc, etc)
and all dependencies (glibc, etc). This is all cached for future
builds.

Expand Down Expand Up @@ -97,7 +97,7 @@ $ nix-shell # start sub-shell with pristine build environment in $PATH
$ make
```

... but make sure you have at least `make`, `clang`, and `luajit` in your `$PATH`.
... but make sure you have at least `make`, `gcc`, and `luajit` in your `$PATH`.

### Run the benchmarks

Expand Down
3 changes: 2 additions & 1 deletion raptorjit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
{ pkgs, source, version }:

with pkgs;
with llvmPackages_4.stdenv; # Use clang 4.0
with stdenv;

mkDerivation rec {
name = "raptorjit-${version}";
inherit version;
src = source;
buildInputs = [ luajit ]; # LuaJIT to bootstrap DynASM
dontStrip = true;
installPhase = ''
mkdir -p $out/bin
cp src/raptorjit $out/bin/raptorjit
Expand Down
4 changes: 4 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ $(HOST_O): %.o: %.c
$(E) "HOSTCC $@"
$(Q)$(HOST_CC) $(HOST_ACFLAGS) -c -o $@ $<

$(DWARF_DWO): %.dwo: %.c
$(E) "CC(debug) $@"
$(Q)$(TARGET_CC) -g3 -fno-eliminate-unused-debug-types -gsplit-dwarf -c $<

include Makefile.dep

##############################################################################
Expand Down

0 comments on commit 4189da6

Please sign in to comment.