Skip to content
This repository has been archived by the owner on Apr 6, 2019. It is now read-only.

Some minor issues and optimizations #17

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

kiloalphaindia
Copy link

No description provided.

Copy link
Owner

@yurydelendik yurydelendik left a comment

Choose a reason for hiding this comment

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

The libcxx-musl patch and -DCMAKE_BUILD_TYPE=RelWithDebInfo changes looks good.

CMAKE_MAKE_PROGRAM:="$(MAKE)"
endif

CLANG_VERSION_STRING=$(shell "${ROOT_DIR}/dist/bin/clang" --version | perl -ne '/clang version ([\d.]*)/ && print "$$1";')
Copy link
Owner

Choose a reason for hiding this comment

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

I think make will fail when dist/bin/clang is not (initially) exist

Copy link
Author

Choose a reason for hiding this comment

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

I tried it. It works...
When using VAR= syntax for assignment, make will evaluate it whenever it is used. If I were using VAR:=, then you would be right.

CLANG_VERSION_STRING=$(shell "${ROOT_DIR}/dist/bin/clang" --version | perl -ne '/clang version ([\d.]*)/ && print "$$1";')


ifeq ($(shell test "${LLVM_VERSION}" -gt 7; echo $$?),0)
Copy link
Owner

@yurydelendik yurydelendik Feb 13, 2019

Choose a reason for hiding this comment

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

I would like to not support any versions below 8. The only reasonable LLVM version with all features needed for users is release of 8. Earlier versions might have incompatible object format or bugs (e.g. related to debug info)

Copy link
Author

Choose a reason for hiding this comment

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

OK. Just leave it away.

-DLLVM_DEFAULT_TARGET_TRIPLE=$(WASM_TRIPLE) \
$(DEFAULT_SYSROOT_CFG) \
-DLLVM_EXTERNAL_CLANG_SOURCE_DIR=$(ROOT_DIR)/src/llvm-project/clang \
-DLLVM_EXTERNAL_LLD_SOURCE_DIR=$(ROOT_DIR)/src/llvm-project/lld \
-DLLVM_ENABLE_PROJECTS="lld;clang" \
$(ROOT_DIR)/src/llvm-project/llvm
cd build/llvm; $(MAKE) -j 8 \
+cd build/llvm; "${CMAKE_MAKE_PROGRAM}" \
Copy link
Owner

Choose a reason for hiding this comment

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

AFIAK the "-j" is 1 by default, the change will regress non-ninja build speed

Copy link
Author

Choose a reason for hiding this comment

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

you will have to put an appropriate -j on the command line when you invoke the top level make. This will allow the user to select the parallelism appropriate for his machine (which would be 16 for me) the + before the line ensures, that the parallelism is passed to sub make appropriately. Therefore leaving in the -j 8 will slow down the build on machines with more than 8 cores.

Copy link
Author

Choose a reason for hiding this comment

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

Oh! Just found, that we need to add a
.NOTPARALLEL:
to the makefile, to actually make it work well, because make would also try to run the 'git clone' in parallel.

CMAKE_MAKE_PROGRAM:="${NINJA}"
else
CMAKE_GENERATOR:=Unix Makefiles
CMAKE_MAKE_PROGRAM:="$(MAKE)"
Copy link
Owner

Choose a reason for hiding this comment

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

nit: not sure the CMAKE_MAKE_PROGRAM is a good name

Copy link
Author

Choose a reason for hiding this comment

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

any suggestions?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants