Ignore:
Timestamp:
Oct 26, 2012, 5:48:36 AM (13 years ago)
Author:
[email protected]
Message:

[Qt] Fix the LLInt build on Windows
https://bugs.webkit.org/show_bug.cgi?id=97648

Patch by Simon Hausmann <[email protected]> on 2012-10-26
Reviewed by Tor Arne Vestbø.

Source/JavaScriptCore:

The main change for the port on Windows is changing the way offsets are extracted
and the LLIntAssembly.h is generated to accomodate release and debug configurations.

Firstly the LLIntOffsetsExtractor binary is now built as-is (no DESTDIR set) and
placed into debug\LLIntOffsetsExtractor.exe and release\LLIntOffsetsExtractor.exe
on Windows debug_and_release builds. On other patforms it remainds in the regular
out directory.

Secondly the LLIntAssembly.h files must be different for different build types,
so the LLIntAssembly.h generator in DerivedSources.pri operates no on the extractor
binary files as input. Using a simple exists() check we verify the presence of either
a regular, a debug\LLIntOffsetsExtractor and a release\LLIntOffsetsExtractor binary
and process all of them. The resulting assembly files consequently end up in
generated\debug\LLIntAssembly.h and generated\release\LLIntAssembly.h.

In Target.pri we have to also make sure that those directories are in the include
path according to the release or debug configuration.

Lastly a small tweak - swapping WTF.pri and JSC.pri inclusions - in the
LLIntOffsetsExtractor build was needed to make sure that we include
JavaScriptCore/config.h instead of WTF/config.h, required to fix the
build issues originally pasted in bug #97648.

  • DerivedSources.pri:
  • JavaScriptCore.pro:
  • LLIntOffsetsExtractor.pro:
  • Target.pri:

Tools:

Added BIN_EXTENSION variable - similar to automake - that expands to .exe as suffix for
executable programs on Windows. Empty otherwise. Also added support for force_build_all
to allow overriding us disabling build_all for TEMPLATE = app.

  • qmake/mkspecs/features/default_pre.prf:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/DerivedSources.pri

    r132606 r132636  
    3434    jit/JITStubs.cpp
    3535
    36 LLINT_FILES = \
    37     llint/LowLevelInterpreter.asm
     36LLINT_ASSEMBLER = $$PWD/llint/LowLevelInterpreter.asm
    3837
    3938LLINT_DEPENDENCY = \
    4039    $$PWD/llint/LowLevelInterpreter32_64.asm \
    41     $$PWD/llint/LowLevelInterpreter64.asm
     40    $$PWD/llint/LowLevelInterpreter64.asm \
     41    $$LLINT_ASSEMBLER
    4242
    4343DISASSEMBLER_FILES = \
     
    9696GENERATORS += klgen
    9797
    98 linux-*:!equals(QT_ARCH, "arm") {
     98EXTRACTOR_BINARY = LLIntOffsetsExtractor$$BIN_EXTENSION
     99DIRS = $$OUT_PWD $$OUT_PWD/debug $$OUT_PWD/release
     100for(dir, DIRS) {
     101    file = $$dir/$$EXTRACTOR_BINARY
     102    exists($$file): LLINT_FILES += $$file
     103}
     104
     105if(linux-*|win32):!equals(QT_ARCH, "arm") {
    99106    #GENERATOR: LLInt
    100     llint.output = LLIntAssembly.h
     107    llint.output = ${QMAKE_FILE_IN_PATH}$${QMAKE_DIR_SEP}LLIntAssembly.h
    101108    llint.script = $$PWD/offlineasm/asm.rb
    102109    llint.input = LLINT_FILES
    103     llint.depends = LLIntOffsetsExtractor $$LLINT_DEPENDENCY
    104     llint.commands = ruby $$llint.script ${QMAKE_FILE_NAME} LLIntOffsetsExtractor ${QMAKE_FILE_OUT}
     110    llint.depends = $$LLINT_DEPENDENCY
     111    llint.commands = ruby $$llint.script $$LLINT_ASSEMBLER ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
    105112    GENERATORS += llint
    106113}
Note: See TracChangeset for help on using the changeset viewer.