diff --git a/deps/llvm.mk b/deps/llvm.mk index c74c3959cb2e7..000ef809bbd3a 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -84,7 +84,7 @@ LLVM_FLAGS += --disable-profiling --enable-static $(LLVM_TARGET_FLAGS) LLVM_FLAGS += --disable-bindings --disable-docs --disable-libedit --disable-terminfo # LLVM has weird install prefixes (see llvm-$(LLVM_VER)/build_$(LLVM_BUILDTYPE)/Makefile.config for the full list) # We map them here to the "normal" ones, which means just prefixing "PROJ_" to the variable name. -LLVM_MFLAGS := PROJ_libdir=$(build_libdir) PROJ_bindir=$(build_depsbindir) PROJ_includedir=$(build_includedir) DestSharedLibDir=$(build_shlibdir) +LLVM_MFLAGS := PROJ_libdir=$(build_libdir) PROJ_bindir=$(build_depsbindir) PROJ_includedir=$(build_includedir) ifeq ($(LLVM_ASSERTIONS), 1) LLVM_FLAGS += --enable-assertions LLVM_CMAKE += -DLLVM_ENABLE_ASSERTIONS:BOOL=ON @@ -514,15 +514,16 @@ endif $(build_prefix)/manifest/llvm: | $(llvm_python_workaround) ifeq ($(LLVM_USE_CMAKE),1) -CMAKE_INSTALL_LLVM = \ +LLVM_INSTALL = \ cd $1 && $$(CMAKE) -DCMAKE_INSTALL_PREFIX="$2$$(build_prefix)" -P cmake_install.cmake -$(eval $(call staged-install,llvm,llvm-$$(LLVM_VER)/build_$$(LLVM_BUILDTYPE), \ - CMAKE_INSTALL_LLVM,,,)) else -$(eval $(call staged-install,llvm,llvm-$$(LLVM_VER)/build_$$(LLVM_BUILDTYPE), \ - MAKE_INSTALL,$$(LLVM_MFLAGS) PATH="$$(llvm_python_workaround):$$$$PATH",,)) +LLVM_INSTALL = \ + $(call MAKE_INSTALL,$1,$2,$3 $$(LLVM_MFLAGS) PATH="$$(llvm_python_workaround):$$$$PATH" DestSharedLibDir="$2$$(build_shlibdir)") endif # LLVM_USE_CMAKE +$(eval $(call staged-install,llvm,llvm-$$(LLVM_VER)/build_$$(LLVM_BUILDTYPE), \ + LLVM_INSTALL,,,)) + clean-llvm: -rm $(LLVM_BUILDDIR_withtype)/build-configured $(LLVM_BUILDDIR_withtype)/build-compiled -$(MAKE) -C $(LLVM_BUILDDIR_withtype) clean diff --git a/src/codegen.cpp b/src/codegen.cpp index 5aa5cbaac1deb..694431d3a0457 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4485,22 +4485,17 @@ static std::unique_ptr emit_function(jl_lambda_info_t *lam, jl_llvm_func return (!jl_is_submodule(mod, jl_base_module) && !jl_is_submodule(mod, jl_core_module)); }; -#ifdef LLVM37 struct DbgState { DebugLoc loc; +#ifdef LLVM37 DISubprogram *sp; - StringRef file; - ssize_t line; - bool in_user_code; - }; #else - struct DbgState { - DebugLoc loc; DISubprogram sp; +#endif StringRef file; ssize_t line; + bool in_user_code; }; -#endif struct StmtProp { DebugLoc loc; StringRef file; @@ -4579,7 +4574,7 @@ static std::unique_ptr emit_function(jl_lambda_info_t *lam, jl_llvm_func #endif if (ctx.debug_enabled) new_file = dbuilder.createFile(new_filename, "."); - DI_stack.push_back({cur_prop.loc, SP, + DI_stack.push_back(DbgState{cur_prop.loc, SP, cur_prop.file, cur_prop.line, cur_prop.in_user_code}); const char *inl_name = ""; diff --git a/test/perf/kernel/actor_centrality.jl b/test/perf/kernel/actor_centrality.jl index 483ef80f4170b..4bc1f453742ab 100644 --- a/test/perf/kernel/actor_centrality.jl +++ b/test/perf/kernel/actor_centrality.jl @@ -41,7 +41,7 @@ function read_graph() G = Graph() actors = Set() - open(joinpath(JULIA_HOME,"..","..","test","perf","kernel","imdb-1.tsv"), "r") do io + open(joinpath(@__DIR__, "imdb-1.tsv"), "r") do io while !eof(io) k = split(strip(readline(io)), "\t") actor, movie = k[1], join(k[2:3], "_") diff --git a/test/perf/shootout/perf.jl b/test/perf/shootout/perf.jl index 50a9f6642ec6f..21966c6c7b38d 100644 --- a/test/perf/shootout/perf.jl +++ b/test/perf/shootout/perf.jl @@ -2,8 +2,7 @@ include("../perfutil.jl") -#If running from .. directory, include "shootout/" path to data file -rpath(filename::AbstractString) = string(contains(pwd(), "shootout") ? "" : "shootout/", filename) +rpath(filename::AbstractString) = joinpath(@__DIR__, filename) include("binary_trees.jl") @timeit binary_trees(10) "binary_trees" "Allocate and deallocate many many binary trees"