Skip to content

Commit

Permalink
Fix configure script to enable C++11 regardless of LLVM version.
Browse files Browse the repository at this point in the history
The CodeDB work added C++11 usage into the VM source itself,
but C++11 support was only enabled for LLVM >= 3.5,
failing for users with lower supported LLVM versions.

Resolves #3622.
  • Loading branch information
jemc committed Feb 21, 2016
1 parent 333e3d7 commit 046bf33
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions configure
Expand Up @@ -667,8 +667,6 @@ int main() { LLVMContext &Context = getGlobalContext(); }
flags = '--ldflags'

if @llvm_api_version >= 305
@llvm_cxxflags << " -std=c++11"

# Starting with LLVM 3.5 the --system-libs option is required in order to
# link against libraries such as zlib. Prior to 3.5 this was handled by
# --ldflags.
Expand All @@ -678,6 +676,9 @@ int main() { LLVMContext &Context = getGlobalContext(); }
# Generate the actual flags. For whatever reason llvm-config also includes
# newlines in the output, so lets get rid of those while we're at it.
@llvm_ldflags = `#{@llvm_configure} #{flags}`.strip.gsub("\n", ' ')

# We use some C++11 features in the VM source, so we need to enable support.
@llvm_cxxflags << " -std=c++11"
end

def env(which)
Expand Down

0 comments on commit 046bf33

Please sign in to comment.