Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add infrastructure for testing julia's LLVM passes #21498

Merged
merged 2 commits into from
Apr 23, 2017
Merged

Add infrastructure for testing julia's LLVM passes #21498

merged 2 commits into from
Apr 23, 2017

Conversation

Keno
Copy link
Member

@Keno Keno commented Apr 22, 2017

Infrastructure pieces split out from #21158

@@ -124,7 +104,7 @@ ifeq ($(USE_LLVM_SHLIB),1)
# NOTE: we could also --disable-static here (on the condition we link tools
# against libLLVM) but there doesn't seem to be a CMake counterpart option
LLVM_FLAGS += --enable-shared
LLVM_CMAKE += -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON
LLVM_CMAKE += -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON -DLLVM_LINK_LLVM_DYLIB:BOOL=ON
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be conditional on llvm version?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like 3.8 was the first version with this option. However, I don't think CMake complains too loudly if you pass it an option it doesn't recognize.

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.8 is the first version that we actually use CMAKE on so it should not be a problem, see #19054.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Keno this flag caused #21621 - why was this necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so you can load libjulia into opt and use the llvm passes.

Copy link
Sponsor Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll be great to have this. Thanks for splitting it out!

include $(JULIAHOME)/deps/llvm-ver.make
BUILDDIR = $(JULIAHOME)/deps/scratch
include $(JULIAHOME)/deps/llvm-options.mk
LLVM_SRC_DIR:=$(JULIAHOME)/deps/srccache/llvm-$(LLVM_VER)
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These configuration options aren't really right, since they assume a very specific in-tree source build layout. Does LLVM not provide any way to run its test framework out-of-tree?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can build it out of tree, but you need a copy of lit which is in the LLVM source dir. You can probably make it work, but might be easier for somebody who uses out-of-tree builds to fix this up after committing this.

@Keno Keno merged commit e0c497b into master Apr 23, 2017
@martinholters martinholters deleted the kf/llvmtests branch April 24, 2017 07:25
tkelman added a commit that referenced this pull request Apr 29, 2017
fixes #21621, since this flag was enabled in #21498 the llvm tools have
been linking against the LLVM shared library, which means on windows the
dll has to be copied to build_depsbindir in order for llvm-config to run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants