summaryrefslogtreecommitdiffstats
path: root/llvm/lib/WindowsManifest
Commit message (Collapse)AuthorAgeFilesLines
* Try to fix WindowsManifest CMake logic on WindowsReid Kleckner2020-03-021-2/+4
| | | | | | | CMake is complaining about the "^" regex if the prefixes are empty strings. (cherry picked from commit e441a584f3f7d743ab77031a47d9ad60ee56b53d)
* build: process the libxml2 library path for embeddingSaleem Abdulrasool2020-02-281-1/+10
| | | | | | | | | | | | | | | | | | | | | | Process the path for libxml2 before embedding that into the command line that is generated in `llvm-config`. Each element in the path is being given a `-l` unconditionally which should not be the case for absolute paths. Since the library path may be absolute or not, just apply some CMake pre-processing when generating the path. Before: ``` /usr/lib/x86_64-linux-gnu/libz.so -lrt -ldl -ltinfo -lpthread -lm /usr/lib/x86_64-linux-gnu/libxml2.so ``` After: ``` /usr/lib/x86_64-linux-gnu/libz.so -lrt -ldl -ltinfo -lpthread -lm -lxml2 ``` Resolves PR44179! (cherry picked from commit c3595d1069277b4ab0df49d7139b6f1bbc94f21c)
* Revert "Temporarily revert "build: avoid hardcoding the libxml2 library name""Saleem Abdulrasool2019-12-031-12/+6
| | | | | | This reverts commit 2e75681b55ab55301022533b203269f5f3d6f909. Restore the clean up change. The underlying CMake issue was resolved in 372ad32734ecb455f9fb4d0601229ca2dfc78b66.
* Temporarily revert "build: avoid hardcoding the libxml2 library name"Eric Christopher2019-12-021-6/+12
| | | | | | | | as it breaks uses of llvm-config --system-libs and the follow-on commit "build: avoid cached literals being linked against" This reverts commits 340e7c0b77a7037afefe7255503afe362967b577 and 340e7c0b77a7037afefe7255503afe362967b577.
* build: avoid cached literals being linked againstSaleem Abdulrasool2019-11-271-6/+6
| | | | | | If the value of the LibXml2 search is cached, it can cause an errant link against LIBXML2_LIBRARIES-NOTFOUND if libxml2 is not found. Add a guard against this. Should repair the build bots.
* build: avoid hardcoding the libxml2 library nameSaleem Abdulrasool2019-11-271-9/+3
| | | | | | | FindLibXml2 will set the LIBXML2_LIBRARIES variable to the libraries that we must link against. This will be an empty string if libxml2 is not found. Avoid hardcoding the library name as xml2 in the configuration. Simplify the usage in the WindowsManifest library.
* [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries"Tom Stellard2019-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Most libraries are defined in the lib/ directory but there are also a few libraries defined in tools/ e.g. libLLVM, libLTO. I'm defining "Component Libraries" as libraries defined in lib/ that may be included in libLLVM.so. Explicitly marking the libraries in lib/ as component libraries allows us to remove some fragile checks that attempt to differentiate between lib/ libraries and tools/ libraires: 1. In tools/llvm-shlib, because llvm_map_components_to_libnames(LIB_NAMES "all") returned a list of all libraries defined in the whole project, there was custom code needed to filter out libraries defined in tools/, none of which should be included in libLLVM.so. This code assumed that any library defined as static was from lib/ and everything else should be excluded. With this change, llvm_map_components_to_libnames(LIB_NAMES, "all") only returns libraries that have been added to the LLVM_COMPONENT_LIBS global cmake property, so this custom filtering logic can be removed. Doing this also fixes the build with BUILD_SHARED_LIBS=ON and LLVM_BUILD_LLVM_DYLIB=ON. 2. There was some code in llvm_add_library that assumed that libraries defined in lib/ would not have LLVM_LINK_COMPONENTS or ARG_LINK_COMPONENTS set. This is only true because libraries defined lib lib/ use LLVMBuild.txt and don't set these values. This code has been fixed now to check if the library has been explicitly marked as a component library, which should now make it easier to remove LLVMBuild at some point in the future. I have tested this patch on Windows, MacOS and Linux with release builds and the following combinations of CMake options: - "" (No options) - -DLLVM_BUILD_LLVM_DYLIB=ON - -DLLVM_LINK_LLVM_DYLIB=ON - -DBUILD_SHARED_LIBS=ON - -DBUILD_SHARED_LIBS=ON -DLLVM_BUILD_LLVM_DYLIB=ON - -DBUILD_SHARED_LIBS=ON -DLLVM_LINK_LLVM_DYLIB=ON Reviewers: beanz, smeenai, compnerd, phosek Reviewed By: beanz Subscribers: wuzish, jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, mgorny, mehdi_amini, sbc100, jgravelle-google, hiraditya, aheejin, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, steven_wu, rogfer01, MartinMosbeck, brucehoult, the_o, dexonsmith, PkmX, jocewei, jsji, dang, Jim, lenary, s.egerton, pzheng, sameer.abuasal, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70179
* Fight a bit against global initializers. NFC.Benjamin Kramer2019-08-221-1/+1
| | | | llvm-svn: 369695
* [llvm] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-151-1/+1
| | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. llvm-svn: 369013
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-192-8/+6
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Convert two more files that were using Windows line endings and removeChandler Carruth2019-01-191-22/+22
| | | | | | | a stray single '\r' from one file. These are the last line ending issues I can find in the files containing parts of LLVM's file headers. llvm-svn: 351634
* Convert line endings of lib/WindowsManifest/CMakeLists.txt to unix.Nico Weber2018-04-071-18/+18
| | | | llvm-svn: 329483
* Fix bug 34608 by moving private header out of public header.Eric Beckmann2017-09-141-0/+1
| | | | | | | | | | | | | | | | | | WindowsManifestMerger.h should not include llvm/Config/config.h, since it is private. The include has been moved to the source instead. Summary: The checksums had already been placed in the IR, this patch allows MCCodeView to actually write it out to an MCStreamer. Move private config.h header dependency out of public header file. Addresses Bug 34608 Subscribers: javed.absar, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D37863 llvm-svn: 313312
* Fix crbug 759265 by suppressing llvm mt warnings.Eric Beckmann2017-09-061-0/+4
| | | | | | | | | | | | Summary: Previous would throw warning whenever libxml2 is not installed. Now only give this warning if merging manifest fails. Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37240 llvm-svn: 312604
* Return copy of XML dumpVitaly Buka2017-09-021-1/+1
| | | | | | COFF/DriverUtils.cpp uses buffer after WindowsManifestMerger destroyed. llvm-svn: 312408
* llvm-mt: Fix memory management in WindowsManifestMergerImpl::getMergedManifestVitaly Buka2017-09-021-13/+31
| | | | | | | | | | | | | | | | Summary: xmlDoc needs to be released with xmlFreeDoc. XML_PARSE_NODICT is needed for safe moving nodes between documents. Buffer returned from xmlDocDumpFormatMemoryEnc needs xmlFree, but it needs outlive users of getMergedManifest results. Reviewers: ecbeckmann, rnk, zturner, ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37321 llvm-svn: 312406
* Revert "llvm-mt: Fix release of OutputDoc"Vitaly Buka2017-08-311-3/+1
| | | | | | | | Multiple bots are broken. This reverts commit r312207. llvm-svn: 312212
* llvm-mt: Fix release of OutputDocVitaly Buka2017-08-311-1/+3
| | | | | | | | | | | | | | | Summary: xmlDoc needs to be released with xmlFreeDoc. Reset root element before release to avoid release of CombinedRoot owned by CombinedDoc, Reviewers: ecbeckmann, rnk, zturner, ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37321 llvm-svn: 312207
* Integrate manifest merging library into LLD.Eric Beckmann2017-08-221-1/+1
| | | | | | | | | | Summary: Now that the llvm-mt manifest merging libraries are complete, we may use them to merge manifests instead of needing to shell out to mt.exe. Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D36255 llvm-svn: 311424
* llvm-mt: Merge manifest namespaces.Eric Beckmann2017-08-191-76/+578
| | | | | | | | | | | mt.exe performs a tree merge where certain element nodes are combined into one. This introduces the possibility of xml namespaces conflicting with each other. The original mt.exe has a hierarchy whereby certain namespace names can override others, and nodes that would then end up in ambigious namespaces have their namespaces explicitly defined. This namespace handles this merging process. llvm-svn: 311215
* Unlink nodes instead of copying, to avoid memory problems.Eric Beckmann2017-07-261-14/+7
| | | | llvm-svn: 309151
* Move manifest utils into separate lib, to reduce libxml2 deps.Eric Beckmann2017-07-263-0/+252
Summary: Previously were in support. Since many many things depend on support, were all forced to also depend on libxml2, which we only want in a few cases. This puts all the libxml2 deps in a separate lib to be used only in a few places. Reviewers: ruiu, thakis, rnk Subscribers: mgorny, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D35819 llvm-svn: 309070
OpenPOWER on IntegriCloud