Skip to content

Commit

Permalink
Fix for gcc being a dummy
Browse files Browse the repository at this point in the history
Also clang being too permissive

- gcc apparently can't cope with linker args coming before the file
  name, that causes a bunch of "undefined reference" errors, whereas
  clang is perfectly happy with it
- on the other hand clang apparently exposes unexpected symbols
  without needing to include the corresponding header, so add those
  • Loading branch information
masklinn committed Jun 24, 2024
1 parent f500c57 commit ba267cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion regex-filtered/re2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LDFLAGS += -lre2
.PHONY: clean

bench: bench.cpp
$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@
$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)

clean:
@rm bench
2 changes: 2 additions & 0 deletions regex-filtered/re2/bench.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <cassert>
#include <chrono>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <re2/filtered_re2.h>
#include <re2/re2.h>
Expand Down

0 comments on commit ba267cf

Please sign in to comment.