From 691671893aedcd54792b57afa9ed2724ccdc6657 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 26 Oct 2015 13:47:03 +0100 Subject: fix race in ANGLE build The flex and bison rules generated the same files for debug and release. This conflicts in parallel builds, e.g. when using jom. Task-number: QTBUG-49003 Change-Id: I6f64760d83292e8bfad6fd0b4f8fbdd386e2213b Reviewed-by: Oswald Buddenhagen --- src/angle/src/compiler/preprocessor/preprocessor.pro | 8 ++++---- src/angle/src/compiler/translator.pro | 16 ++++++++-------- src/angle/src/config.pri | 2 ++ 3 files changed, 14 insertions(+), 12 deletions(-) (limited to 'src/angle') diff --git a/src/angle/src/compiler/preprocessor/preprocessor.pro b/src/angle/src/compiler/preprocessor/preprocessor.pro index 759a3399b4..12f644870d 100644 --- a/src/angle/src/compiler/preprocessor/preprocessor.pro +++ b/src/angle/src/compiler/preprocessor/preprocessor.pro @@ -41,15 +41,15 @@ SOURCES += \ $$ANGLE_DIR/src/compiler/preprocessor/Token.cpp # NOTE: 'flex' and 'bison' can be found in qt5/gnuwin32/bin -flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME} -flex.output = ${QMAKE_FILE_BASE}.cpp +flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME} +flex.output = $${BUILDSUBDIR}${QMAKE_FILE_BASE}.cpp flex.input = FLEX_SOURCES flex.dependency_type = TYPE_C flex.variable_out = GENERATED_SOURCES QMAKE_EXTRA_COMPILERS += flex -bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --output=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME} -bison.output = ${QMAKE_FILE_BASE}.cpp +bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --output=${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME} +bison.output = $${BUILDSUBDIR}${QMAKE_FILE_BASE}.cpp bison.input = BISON_SOURCES bison.dependency_type = TYPE_C bison.variable_out = GENERATED_SOURCES diff --git a/src/angle/src/compiler/translator.pro b/src/angle/src/compiler/translator.pro index 9572a51ad4..eebe41b09e 100644 --- a/src/angle/src/compiler/translator.pro +++ b/src/angle/src/compiler/translator.pro @@ -163,16 +163,16 @@ SOURCES += \ # NOTE: 'flex' and 'bison' can be found in qt5/gnuwin32/bin -flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}_lex.cpp ${QMAKE_FILE_NAME} -flex.output = ${QMAKE_FILE_BASE}_lex.cpp +flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME} +flex.output = $${BUILDSUBDIR}${QMAKE_FILE_BASE}_lex.cpp flex.input = FLEX_SOURCES flex.dependency_type = TYPE_C flex.variable_out = GENERATED_SOURCES QMAKE_EXTRA_COMPILERS += flex -bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --defines=${QMAKE_FILE_BASE}_tab.h \ - --output=${QMAKE_FILE_BASE}_tab.cpp ${QMAKE_FILE_NAME} -bison.output = ${QMAKE_FILE_BASE}_tab.h +bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --defines=${QMAKE_FILE_OUT} \ + --output=${QMAKE_FILE_OUT_BASE}.cpp ${QMAKE_FILE_NAME} +bison.output = $${BUILDSUBDIR}${QMAKE_FILE_BASE}_tab.h bison.input = BISON_SOURCES bison.dependency_type = TYPE_C bison.variable_out = GENERATED_SOURCES @@ -182,10 +182,10 @@ QMAKE_EXTRA_COMPILERS += bison # have one output file even if the command generates two. MAKEFILE_NOOP_COMMAND = @echo -n msvc: MAKEFILE_NOOP_COMMAND = @echo >NUL -bison_impl.output = ${QMAKE_FILE_BASE}_tab.cpp +bison_impl.output = $${BUILDSUBDIR}${QMAKE_FILE_BASE}_tab.cpp bison_impl.input = BISON_SOURCES bison_impl.commands = $$MAKEFILE_NOOP_COMMAND -bison_impl.depends = ${QMAKE_FILE_BASE}_tab.h -bison_impl.output = ${QMAKE_FILE_BASE}_tab.cpp +bison_impl.depends = $${BUILDSUBDIR}${QMAKE_FILE_BASE}_tab.h +bison_impl.output = $${BUILDSUBDIR}${QMAKE_FILE_BASE}_tab.cpp bison_impl.variable_out = GENERATED_SOURCES QMAKE_EXTRA_COMPILERS += bison_impl diff --git a/src/angle/src/config.pri b/src/angle/src/config.pri index 0d75245ec5..085913ac83 100644 --- a/src/angle/src/config.pri +++ b/src/angle/src/config.pri @@ -53,6 +53,8 @@ CONFIG(debug, debug|release) { DEFINES += NDEBUG } +!isEmpty(BUILD_PASS): BUILDSUBDIR = $$lower($$BUILD_PASS)/ + # c++11 is needed by MinGW to get support for unordered_map. CONFIG += stl exceptions c++11 -- cgit v1.2.3 From 6ed957fd7fc748143093fa335d8b4506c3ea16fa Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Mon, 2 Nov 2015 15:42:58 +0100 Subject: fix MinGW ANGLE build glslang_tab.cpp was not created in the right subdirectory. This amends commit 69167189. Change-Id: I031499baa53b72a1923883c58eb5ddfc2a02789a Reviewed-by: Liang Qi Reviewed-by: Oswald Buddenhagen --- src/angle/src/compiler/translator.pro | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/angle') diff --git a/src/angle/src/compiler/translator.pro b/src/angle/src/compiler/translator.pro index eebe41b09e..b40aa96319 100644 --- a/src/angle/src/compiler/translator.pro +++ b/src/angle/src/compiler/translator.pro @@ -170,8 +170,10 @@ flex.dependency_type = TYPE_C flex.variable_out = GENERATED_SOURCES QMAKE_EXTRA_COMPILERS += flex +defineReplace(myDirName) { return($$dirname(1)) } bison.commands = $$addGnuPath(bison) --no-lines --skeleton=yacc.c --defines=${QMAKE_FILE_OUT} \ - --output=${QMAKE_FILE_OUT_BASE}.cpp ${QMAKE_FILE_NAME} + --output=${QMAKE_FUNC_FILE_OUT_myDirName}$$QMAKE_DIR_SEP${QMAKE_FILE_OUT_BASE}.cpp \ + ${QMAKE_FILE_NAME} bison.output = $${BUILDSUBDIR}${QMAKE_FILE_BASE}_tab.h bison.input = BISON_SOURCES bison.dependency_type = TYPE_C -- cgit v1.2.3