[llvm] r352492 - Revert r351833 and r352250.
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 29 05:43:23 PST 2019
Author: hans
Date: Tue Jan 29 05:43:22 2019
New Revision: 352492
URL: http://llvm.org/viewvc/llvm-project?rev=352492&view=rev
Log:
Revert r351833 and r352250.
They were breaking the Windows build when using MSBuild, see the
discussion on D56781.
r351833: "Use response file when generating LLVM-C.dll"
> Use response file when generating LLVM-C.dll
>
> As discovered in D56774 the command line gets to long, so use a response file to give the script the libs. This change has been tested and is confirmed working for me.
>
> Commited on behalf of Jakob Bornecrantz
>
> Differential Revision: https://reviews.llvm.org/D56781
r352250: "Build LLVM-C.dll by default on windows and enable in release package"
> Build LLVM-C.dll by default on windows and enable in release package
>
> With the fixes to the building of LLVM-C.dll in D56781 this should now
> be safe to land. This will greatly simplify dealing with LLVM for people
> that just want to use the C API on windows. This is a follow up from
> D35077.
>
> Patch by Jakob Bornecrantz!
>
> Differential revision: https://reviews.llvm.org/D56774
Modified:
llvm/trunk/CMakeLists.txt
llvm/trunk/tools/llvm-shlib/CMakeLists.txt
llvm/trunk/tools/llvm-shlib/gen-msvc-exports.py
llvm/trunk/utils/release/build_llvm_package.bat
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=352492&r1=352491&r2=352492&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Tue Jan 29 05:43:22 2019
@@ -534,7 +534,7 @@ if(NOT DEFINED LLVM_DYLIB_COMPONENTS)
endif()
option(LLVM_LINK_LLVM_DYLIB "Link tools against the libllvm dynamic library" OFF)
if(MSVC)
- option(LLVM_BUILD_LLVM_C_DYLIB "Build LLVM-C.dll (Windows only)" ON)
+ option(LLVM_BUILD_LLVM_C_DYLIB "Build LLVM-C.dll (Windows only)" OFF)
else()
option(LLVM_BUILD_LLVM_C_DYLIB "Build libllvm-c re-export library (Darwin only)" OFF)
endif()
Modified: llvm/trunk/tools/llvm-shlib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-shlib/CMakeLists.txt?rev=352492&r1=352491&r2=352492&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-shlib/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-shlib/CMakeLists.txt Tue Jan 29 05:43:22 2019
@@ -137,20 +137,13 @@ if(MSVC)
list(APPEND FULL_LIB_NAMES ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib/${lib}.lib)
endforeach()
- # Need to seperate lib names with newlines.
- string(REPLACE ";" "\n" FILE_CONTENT "${FULL_LIB_NAMES}")
-
- # Write out the full lib names into file to be read by the python script.
- set(LIBSFILE ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/libllvm-c.args)
- file(WRITE ${LIBSFILE} "${FILE_CONTENT}")
-
# Generate the exports file dynamically.
set(GEN_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/gen-msvc-exports.py)
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/libllvm-c.exports)
add_custom_command(OUTPUT ${LLVM_EXPORTED_SYMBOL_FILE}
- COMMAND ${PYTHON_EXECUTABLE} ${GEN_SCRIPT} --libsfile ${LIBSFILE} ${GEN_UNDERSCORE} --nm ${LLVM_TOOLS_BINARY_DIR}/llvm-nm -o ${LLVM_EXPORTED_SYMBOL_FILE}
+ COMMAND ${PYTHON_EXECUTABLE} ${GEN_SCRIPT} ${FULL_LIB_NAMES} ${GEN_UNDERSCORE} --nm ${LLVM_TOOLS_BINARY_DIR}/llvm-nm -o ${LLVM_EXPORTED_SYMBOL_FILE}
DEPENDS ${LIB_NAMES} llvm-nm
COMMENT "Generating export list for LLVM-C"
VERBATIM )
Modified: llvm/trunk/tools/llvm-shlib/gen-msvc-exports.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-shlib/gen-msvc-exports.py?rev=352492&r1=352491&r2=352492&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-shlib/gen-msvc-exports.py (original)
+++ llvm/trunk/tools/llvm-shlib/gen-msvc-exports.py Tue Jan 29 05:43:22 2019
@@ -83,10 +83,6 @@ def main():
parser = argparse.ArgumentParser('gen-msvc-exports')
parser.add_argument(
- '-i', '--libsfile', help='file with list of libs, new line separated',
- action='store', default=None
- )
- parser.add_argument(
'-o', '--output', help='output filename', default='LLVM-C.exports'
)
parser.add_argument('-u', '--underscore',
@@ -97,19 +93,12 @@ def main():
'--nm', help='path to the llvm-nm executable', default='llvm-nm'
)
parser.add_argument(
- 'libs', metavar='LIBS', nargs='*', help='list of libraries to generate export from'
+ 'libs', metavar='LIBS', nargs='+', help='list of libraries to generate export from'
)
ns = parser.parse_args()
- libs = ns.libs
-
- # Add if we where given a libsfile add it to the libs.
- if ns.libsfile:
- with open(ns.libsfile) as f:
- libs.extend(f.read().splitlines())
-
- gen_llvm_c_export(ns.output, ns.underscore, libs, ns.nm)
+ gen_llvm_c_export(ns.output, ns.underscore, ns.libs, ns.nm)
if __name__ == '__main__':
Modified: llvm/trunk/utils/release/build_llvm_package.bat
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/release/build_llvm_package.bat?rev=352492&r1=352491&r2=352492&view=diff
==============================================================================
--- llvm/trunk/utils/release/build_llvm_package.bat (original)
+++ llvm/trunk/utils/release/build_llvm_package.bat Tue Jan 29 05:43:22 2019
@@ -52,17 +52,7 @@ svn.exe export -r %revision% http://llvm
REM Setting CMAKE_CL_SHOWINCLUDES_PREFIX to work around PR27226.
-set cmake_flags=^
- -DCMAKE_BUILD_TYPE=Release ^
- -DLLVM_ENABLE_ASSERTIONS=ON ^
- -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON ^
- -DLLVM_BUILD_LLVM_C_DYLIB=ON ^
- -DCMAKE_INSTALL_UCRT_LIBRARIES=ON ^
- -DCLANG_FORMAT_VS_VERSION=%clang_format_vs_version% ^
- -DPACKAGE_VERSION=%package_version% ^
- -DLLDB_RELOCATABLE_PYTHON=1 ^
- -DLLDB_TEST_COMPILER=%cd%\build32_stage0\bin\clang.exe ^
- -DCMAKE_CL_SHOWINCLUDES_PREFIX="Note: including file: "
+set cmake_flags=-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON -DCMAKE_INSTALL_UCRT_LIBRARIES=ON -DCLANG_FORMAT_VS_VERSION=%clang_format_vs_version% -DPACKAGE_VERSION=%package_version% -DLLDB_RELOCATABLE_PYTHON=1 -DLLDB_TEST_COMPILER=%cd%\build32_stage0\bin\clang.exe -DCMAKE_CL_SHOWINCLUDES_PREFIX="Note: including file: "
REM TODO: Run the "check-all" tests.
More information about the llvm-commits
mailing list