Shared to msvcrt.dll or ucrtbase.dll and optimize the C/C++ application file size.

Overview

VC-LTL - An elegant way to compile lighter binaries.

license downloads contributors release nuget crates.io Build&Test

Logo
I would like to turn into a stone bridge, go through 500 years of wind, 500 years of Sun, rain for 500 years, but she walked off a bridge!

1. About VC-LTL

VC-LTL is an open source CRT library based on the MS VCRT that reduce program binary size and say goodbye to Microsoft runtime DLLs, such as msvcr120.dll, api-ms-win-crt-time-l1-1-0.dll and other dependencies.

VC-LTL was originally a dedicated Dism++ runtime and was isolated and open sourced from Dism++ source code on Mar 6, 2017.

There are plenty of modules in large projects. If all binaries uses static compilation, it will use plenty of disk space and finally may crashed because of the fiber local storage (FLS) limitation.

But the VC-LTL can make your project using the built-in msvcrt.dll in the Windows. It solves the C runtime deployment problem and the fiber local storage (FLS) limitation problem effectively, and greatly reduce the binaries size. What a handy library!

Everyone can use it for free, even for the commerical use. Of course, I hope that if you mentioned the VC-LTL in your project, because I want to help more people.

1.1. The principle of VC-LTL

After using the VC-LTL, the binaries will be dynamically linked to the built-in msvcrt.dll or ucrtbase.dll in the Windows to reduce the binaries size. It is generally available if you use the VC-LTL in the project using the C Runtime, STL or MFC.

After using the VC-LTL, the size of the binaries will reduce about 30% if compiled from the C++ source code, and about 50% if compiled from the pure C source code.

1.2. Highlight

  • 晚起的鸟儿也有虫虫吃,优雅的引用方式,仅添加一个属性表就能享受极致的体积体验。
  • 无缝使用最新C/C++库以及最新编译器,尽情的使用最新规范。神马异常流防护(guard:cf)、静态对象线程安全初始化(threadSafeInit)……统统放马过来吧!!
  • 拥有比微软原版更好的兼容性,即使想兼容Windows XP RTM也可以安心的对新编译器说“Yes”。
  • 完全的开放代码,广泛的接受用户意见,希望大家能踊跃的 pull requests,为VC-LTL添砖加瓦。

Let's say goodbye to the Visual Studio 2008.

2. VC-LTL Compatibility

Module 5.1.2600.0/5.2.3790.0 6.0.6000.0 6.2.9200.0 10.0.10240.0 Files
depends msvcrt.dll msvcrt.dll msvcrt.dll ucrtbase.dll
VCRT 100% 100% 100% 100% vcruntime[d].lib、libvcruntime[d].lib
UCRT 97.458% 97.676% 97.676% 100% libucrt[d].lib、ucrt[d].lib
WinRT X X 99.609% 100% vccorlib.lib (Windows 8.1 or later)
STL 100% 100% 100% 100%
ConcRT 100% 100% 100% 100%
ATL 100% 100% 100% 100%
MFC 100% 100% 100% 100%
AMP X X X 100% Requires vcamp140.dll from the Visual C++ Runtime
OpenMP 100% 100% 100% 100% Requires vcomp140.dll from the Visual C++ Runtime

2.1. ABI Compatibility

Starting from VC-LTL 5.0, ABI is compatible with Microsoft. You can link use the static library with VC-LTL without recompiling!

In addition, in order to provide consistency in behavior, a Debug version of the library is also provided. It will still use msvcrt.dll or ucrtbase.dll, but it does not support the heap debugging functions. If you need to use the heap debugging, please disable VC-LTL.

2.2. Supported Visual Studio Versions

  • Visual Studio 2015 (Support Clang with Microsoft CodeGen, Clang 3.7 with Microsoft CodeGen, Clang-LLVM)
  • Visual Studio 2017 (Support Clang with Microsoft CodeGen, Clang-LLVM)
  • Visual Studio 2019 (Support Clang-LLVM)
  • Visual Studio 2022

2.3. Supported Build Tools

Build Tool Helper
Visual Studio NuGet or VC-LTL helper for Visual Studio.props
CMake VC-LTL helper for cmake.cmake
NMake, CL VC-LTL helper for nmake.cmd
QMake VC-LTL helper for qmake.pri
Rust crate

2.4. Supported Windows Versions

OS x86 x64 arm arm64
Windows XP, Windows Server 2003 - -
Windows Vista, Windows Server 2008 - -
Windows 7, Windows Server 2008 R2 - -
Windows 8, Windows Server 2012, Windows RT -
Windows 8.1, Windows Server 2012 R2, Windows RT 8.1 -
Windows 10, Windows Server 2016, Windows Server 2019
Windows 11

Tips: If you need to compile Windows XP compatible app (5.1.2600.0/5.2.3790.0), please don't forget to used YY-Thunks.

The binaries compiled with the VC-LTL is compatible with Windows XP and later, even in the environment which installed no hotfixes.

3. How to used?

We will enter the theme, we have prepared a rich VC-LTL Samples for your reference, and welcome to join our QQ group (633710173).

3.1. Using VC-LTL in Visual Studio

3.1.1. Choose reference mode

3.1.1.1. Reference via NuGet (recommend)

Right-click on the project and select "Manage NuGet Packages", then search for VC-LTL and choose the version that suits you, and finally click Install.

InstallByNuGet

3.1.1.2. Reference via Registry

If you download and unzip VC-LTL Binary to D:\Src\VC-LTL, please double-click D:\Src\VC-LTL\Install.cmd.

The script will save the information in the registry HKCU\Code\VC-LTL.

Copy VC-LTL helper for Visual Studio.props to your project, then open the Property Manager ( View - Property Manager ) and right-click on the Release Configuration, click on Add Existing Property Sheet..., and finally select VC-LTL helper for Visual Studio.props.

AddShared

3.1.2. Configure Project Properties

  • C/C++ - Code Generation -Runtime Library adjust to Multi-threaded (/MT)

ConfigurationProject

For XP support, please Right click on the project, Properties - NuGet Packages Settings - VC-LTL - Target CRT version - "msvcrt 5.1.2600.0". In addition, it is recommended that you install YY-Thunks.

3.2. Using VC-LTL in CMake

If you download and unzip VC-LTL Binary to D:\Src\VC-LTL, please double-click D:\Src\VC-LTL\Install.cmd.

The script will save the information in the registry HKCU\Code\VC-LTL.

3.2.1. Add VC-LTL Module File

Copy VC-LTL helper for cmake.cmake to your project. Then add include("VC-LTL helper for cmake.cmake") to CMakeLists.txt.

Example:

cmake_minimum_required(VERSION 3.5.2)
project(ltltest)

include("VC-LTL helper for cmake.cmake")

add_subdirectory(src)

3.2.2. Modify The Configuration

It's recommended to use /MT to compile the project when using VC-LTL. For XP support, please modify VC-LTL helper for cmake.cmake to enable set(WindowsTargetPlatformMinVersion "5.1.2600.0"). In addition, it is recommended that you install YY-Thunks.

3.3. Using VC-LTL in NMake/CL

3.3.1. Run VC-LTL Cmd Script

If you download and unzip VC-LTL Binary to D:\Src\VC-LTL, please double-click D:\Src\VC-LTL\Install.cmd.

The script will save the information in the registry HKCU\Code\VC-LTL.

Copy VC-LTL helper for nmake.cmd to your project. Run vcvars32.bat or vcvars64.bat and execute this script. The script will automatically modify the include and lib environment variables.

Example:

call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
call "D:\VC-LTL\VC-LTL helper for nmake.cmd"

nmake /f Test.mak

3.3.2. Modify The Configuration

It's recommended to use /MT to compile the project when using VC-LTL. For XP support, please modify VC-LTL helper for nmake.cmd to enable set WindowsTargetPlatformMinVersion=5.1.2600.0. In addition, it is recommended that you install YY-Thunks.

3.4. Rebuild

Is the file size smaller? If you fail to compile, please refer to 4. FAQ. You can also feedback and work together to improve VC-LTL.

It is recommended to use /MT to compile when compiling with VC-LTL 5.0, and the dependent static libraries does not need to be recompiled.

AppBuildByVC-LTL

4. FAQ

4.1. 未共享到msvcrt.dll/ucrtbase.dll

Cause

未正确引用VC-LTL。建议看看链接日志,是否链接了VC-LTL的lib。

Workaround

1:请务必确保 VC-LTL helper for Visual Studio.props 已经添加到工程。

2:确保以下设置正确:

  • VC++ 目录 - 包含目录 - 【√ 从父项或项目默认设置继承(I)】
  • VC++ 目录 - 库目录 - 【√ 从父项或项目默认设置继承(I)】

5. Known Issues

  • VC-LTL的Debug模式不支持堆调试功能,如果您需要使用这些功能,可以针对Debug配置关闭VC-LTL。

Excursus - Third Party Licenses

Comments
  • tlsGuards导致无法与老版本CRT链接

    tlsGuards导致无法与老版本CRT链接

    开发环境: VS2017 15.9.11 VC-LTL5版本: 5.0.4beta1 编译过程:1.下载vc-ltl binary,解压缩后执行instal.cmd

                  2.下载qt 5.12.12 代码,修改qtbase/mkspecs/common/msvc-desktop.conf
    

    -QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_OPTIMIZE -MD -QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -Zi -MD -QMAKE_CFLAGS_DEBUG = -Zi -MDd +QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_OPTIMIZE -MT +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -Zi -MT +QMAKE_CFLAGS_DEBUG = -Zi -MTd

                 3. 打开vc2017 x64命令行
    

    ** Visual Studio 2017 Developer Command Prompt v15.9.11 ** Copyright (c) 2017 Microsoft Corporation


    [vcvarsall.bat] Environment initialized for: 'x64'

                 4. 执行VC-LTL helper for nmake.cmd
    

    #######################################################################

    * * * * * * * * * * *

    * * * * * *

    * * * * * * * * * * *

    * * * * * *

    * * * * * * * * * * * *

    ####################################################################### VC-LTL Path : c:\Users\SunAC\Downloads\vc-ltl
    VC Tools Version : 14.16.27023 WindowsTargetPlatformMinVersion : 6.0.6000.0 Platform : x64

                 5.   进入qt代码目录,配置编译
    

    configure -confirm-license -opensource -prefix C:\QtSDK\qt-5.12.12-x64-vc2017 -release -force-debug-info -separate-debug-info -qml-debug -platform win32-msvc -mp -opengl dynamic -qt-zlib -qt-libpng -qt-libjpeg -plugin-sql-odbc -plugin-sql-mysql -plugin-sql-oci -plugin-sql-psql -no-compile-examples -nomake tests -no-icu -webengine-proprietary-codecs

    报错: link /OUT:..\bin\qmake.exe project.obj main.obj ioutils.obj proitems.obj qmakevfs.obj ........ libvcruntime.lib(frame.obj) : error LNK2019: 无法解析的外部符号 __dyn_tls_on_demand_init,该符号在函数 "public: static void * __cdecl __FrameHandler4::CxxCallCatchBlock(struct _EXCEPTION_RECORD *)" ([email protected][email protected]@[email protected]@@Z) 中被引用 libvcruntime.lib(frame.obj) : error LNK2001: 无法解析的外部符号 __tls_guard ..\bin\qmake.exe : fatal error LNK1120: 2 个无法解析的外部命令 NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\link.EXE"”: 返回代码“0x460” Stop.

    类型:问题(Bug) 处置:完成(Done) 
    opened by ntp2000 4
  • 启用 /guard:ehcont 时编译报告2047链接错误

    启用 /guard:ehcont 时编译报告2047链接错误

    /guard:ehcont 选项介绍:https://docs.microsoft.com/en-us/cpp/build/reference/guard-enable-eh-continuation-metadata?view=msvc-170

    前段日子,有人为 NanaZip 贡献了 CET 和 CFG 的支持,在验证的时候发现 VC-LTL 的 UCRT 实现未适配 /guard:ehcont 编译器选项支持

    毛利

    类型:问题(Bug) 处置:完成(Done) 影响范围:低 
    opened by MouriNaruto 3
  • 找不到符号__dyn_tls_on_demand_init,__tls_guard

    找不到符号__dyn_tls_on_demand_init,__tls_guard

    1>libvcruntime.lib(frame.obj) : error LNK2001: 无法解析的外部符号 __dyn_tls_on_demand_init 1>libvcruntime.lib(frame.obj) : error LNK2001: 无法解析的外部符号 __tls_guard

    处置:重复问题(duplicate) 
    opened by squirrelfish 3
  • Debug模式下, try catch会出现崩溃问题

    Debug模式下, try catch会出现崩溃问题

    #include <exception>
    #include <string>
    
    class c_exception : public std::exception
    {
    public:
    	c_exception(const char* err) {
    		m_str = err;
    
    	}
    	const char* what() const override {
    		return m_str.c_str();
    	}
    private:
    	std::string m_str;
    };
    
    void throw_e() {
    	throw c_exception("error");
    }
    
    int main(int argc, char* argv[]) {
    	try {
    		throw_e();
    	}
    	catch (std::exception& e) {
    		printf("%s", e.what());
    	}
    }
    

    示例代码如上,编译环境:

    1>  VC Tools Version : 14.30.30705
    1>  WindowsTargetPlatformMinVersion : 5.1.2600.0
    1>  Platform         : Win32
    
    类型:问题(Bug) 处置:完成(Done) 影响范围:低 
    opened by dym21 3
  • 不支持FH4异常处理的环境导致链接失败

    不支持FH4异常处理的环境导致链接失败

    环境: VS2017 x64 编译: openssl 1.0.2u 命令: perl Configure VC-WIN64A --prefix=C:\QtSDK\openssl-1.0.2u-x64 call ms\do_win64a nmake -f ms\ntdll.mak 报错: libucrt.lib(wcrtomb.obj) : error LNK2001: unresolved external symbol __GSHandlerCheck_EH4 out32dll\constant_time_test.exe : fatal error LNK1120: 1 unresolved externals

    备注:VS2017 x86 ,VS 2019 x64/x86 均能正常编译通过。

    类型:问题(Bug) 处置:完成(Done) 
    opened by ntp2000 3
  • VC-LTL FH4 x64 嵌套 try catch 下无法正确抓取异常

    VC-LTL FH4 x64 嵌套 try catch 下无法正确抓取异常

    和鸭子探讨解决 https://github.com/Chuyu-Team/VC-LTL5/issues/7 的时候,虽然 Debug 版 NanaZip 在对应场景下不再崩溃,但 Release 版依旧在对应场景存在崩溃问题,经调查,在嵌套 try catch 的场景下 x64 版本的 VC-LTL 无法正确抓取异常。

    毛利

    类型:问题(Bug) 处置:完成(Done) 
    opened by MouriNaruto 3
  • RC文件中引用VC-LTL编译失败

    RC文件中引用VC-LTL编译失败

    https://ci.appveyor.com/project/myfreeer/7z-build-nsis/builds/42916311/job/rxnk9orv02fsqujr https://github.com/myfreeer/7z-build-nsis/tree/vc-ltl-5

    VC-LTL: 5.0.4

    C:\projects\7z-build-nsis\VC-LTL\TargetPlatform\header\corecrt.h(67) : warning RC4011: identifier truncated to '_LTL_ucrt_module_type_from_msvcrte_", "", "2")_impl_(1,2))Pre_valid_impl_ _Deref_pre1_impl_(__readaccess_impl_notref))ref)).h'
    C:\projects\7z-build-nsis\VC-LTL\TargetPlatform\header\corecrt.h(67) : warning RC4011: identifier truncated to '_LTL_ucrt_module_type_from_msvcrte_", "", "2")_impl_(1,2))Pre_valid_impl_ _Deref_pre1_impl_(__readaccess_impl_notref))ime.h'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winnt.h(253) : error RC2188: C:\projects\7z-build-nsis\VC-LTL\TargetPlatform\header\corecrt.h(67) : warning RC4011: identifier truncated to '_LTL_ucrt_module_type_from_msvcrte_", "", "2")_impl_(1,2))Pre_valid_impl_ _Deref_pre1_impl_(__readaccess_impl_notref))clude\..\include\vcruntime.h'
    C:\projects\7z-build-nsis\VC-LTL\TargetPlatform\header\corecrt.h(67) : warning RC4011: identifier truncated to '_LTL_ucrt_module_type_from_msvcrte_", "", "2")_impl_(1,2))Pre_valid_impl_ _Deref_pre1_impl_(__readaccess_impl_notref))ime.h'
    C:\projects\7z-build-nsis\VC-LTL\TargetPlatform\header\corecrt.h(67) : warning RC4011: identifier truncated to '_LTL_ucrt_module_type_from_msvcrte_", "", "2")_impl_(1,2))Pre_valid_impl_ _Deref_pre1_impl_(__readaccess_impl_notref))ime.h'
    C:\projects\7z-build-nsis\VC-LTL\TargetPlatform\header\corecrt.h(67) : warning RC4011: identifier truncated to '_LTL_ucrt_module_type_from_msvcrte_", "", "2")_impl_(1,2))Pre_valid_impl_ _Deref_pre1_impl_(__readaccess_impl_notref))ime.h'
    C:\projects\7z-build-nsis\VC-LTL\TargetPlatform\header\corecrt.h(67) : warning RC4011: identifier truncated to '_LTL_ucrt_module_type_from_msvcrte_", "", "2")_impl_(1,2))Pre_valid_impl_ _Deref_pre1_impl_(__readaccess_impl_notref))ime.h'
    C:\projects\7z-build-nsis\C\Util\7zipInstall\x64\RCa03368(48) : fatal error RC1116: RC terminating after preprocessor errors
    fatal error U1077: '"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\rc.EXE"' : return code '0x2'
    Stop.
    
    **********************************************************************
    ** Visual Studio 2019 Developer Command Prompt v16.11.10
    ** Copyright (c) 2021 Microsoft Corporation
    **********************************************************************
    [vcvarsall.bat] Environment initialized for: 'x64'
    #######################################################################
    #                                                                     #
    #     *         *      * *             *        * * * * *  *          #
    #      *       *     *                 *            *      *          #
    #       *     *     *       * * * * *  *            *      *          #
    #        *   *       *                 *            *      *          #
    #          *           * *             * * * *      *      * * * *    #
    #                                                                     #
    #######################################################################
    VC-LTL Path : C:\projects\7z-build-nsis\VC-LTL\
    VC Tools Version : 14.29.30133
    WindowsTargetPlatformMinVersion : 6.0.6000.0
    Platform : x64
    ----------------
    
    类型:问题(Bug) 处置:完成(Done) 
    opened by myfreeer 2
  • ARM32找不到setjmp 和 __intrinsic_setjmp符号

    ARM32找不到setjmp 和 __intrinsic_setjmp符号

    复现环境

               ###################################################################################################
               #                                                                                                 #
               #                 *         *      * *             *        * * * * *  *                          #
               #                  *       *     *                 *            *      *                          #
               #                   *     *     *       * * * * *  *            *      *                          #
               #                    *   *       *                 *            *      *                          #
               #                      *           * *             * * * *      *      * * * *                    #
               #                                                                                                 #
               ###################################################################################################
               
               VC-LTL Path      : C:\Users\mouri\.nuget\packages\vc-ltl\5.0.4-beta1\build\native\
               VC Tools Version : 14.30.30705
               WindowsTargetPlatformMinVersion : 6.2.9200.0
               Platform         : ARM
    

    受影响范围

    至少包含 VC-LTL 的 msvcrt 模式的 ARM32 目标的 Debug 和 Release 配置(虽然只测试了静态链接运行库版本,但是动态链接运行库版本也建议进行检查)

    毛利

    类型:问题(Bug) 处置:完成(Done) 影响范围:低 
    opened by MouriNaruto 2
  • VC-LTL5不能与VC2019配合使用编译Qt 5.12.12

    VC-LTL5不能与VC2019配合使用编译Qt 5.12.12

    开发环境: VS2019 16.11.5 (cl 14.29.30133) VC-LTL5版本: 5.0.4beta1 编译过程:1.下载vc-ltl binary,解压缩后执行instal.cmd 2.下载Qt 5.12.12,打补丁,使用/MT编译 3.打开vc2019 x64命令行 vcvarsall.bat x64 10.0.19041.0 -vcvars_ver=14.29 4.设置Gnu工具路径 set PATH=%PATH%;C:\QtSDK\GnuTools\Perl\bin;C:\QtSDK\GnuTools\Python27;C:\QtSDK\GnuTools\Ruby21\bin 5.执行VC-LTL helper for nmake.cmd #######################################################################

    * * * * * * * * * * *

    * * * * * *

    * * * * * * * * * * *

    * * * * * *

    * * * * * * * * * * * *

    ####################################################################### VC-LTL Path : C:\QtSDK\vc-ltl
    VC Tools Version : 14.29.30133 WindowsTargetPlatformMinVersion : 6.0.6000.0 Platform : x64 6.配置Qt编译选项 configure -confirm-license -opensource -prefix C:\QtSDK\qt-5.12.12-x64-vc2019 -release -force-debug-info -separate-debug-info -qml-debug -platform win32-msvc -mp -opengl dynamic -qt-zlib -qt-libpng -qt-libjpeg -no-compile-examples -nomake tests -no-icu 7.jom执行编译 报错 [1681/22547] cmd /c C:\QtSDK\GnuTools\Python27\python.exe ../../3rdparty/chromium/build/toolchain/win/tool_wrapper.py delete-file ./brotli.exe.pdb && C:\QtSDK\GnuTools\Python27\python.exe ../../3rdparty/chromium/build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /OUT:./brotli.exe /PDB:./brotli.exe.pdb @./brotli.exe.rsp FAILED: brotli.exe brotli.exe.pdb cmd /c C:\QtSDK\GnuTools\Python27\python.exe ../../3rdparty/chromium/build/toolchain/win/tool_wrapper.py delete-file ./brotli.exe.pdb && C:\QtSDK\GnuTools\Python27\python.exe ../../3rdparty/chromium/build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /OUT:./brotli.exe /PDB:./brotli.exe.pdb @./brotli.exe.rsp libucrt.lib(setlocal_thunks.obj) : error LNK2001: 无法解析的外部符号 __imp__amsg_exit .\brotli.exe : fatal error LNK1120: 1 个无法解析的外部命令

    奇怪 libucrt.lib会链接到cdecl调用的函数么?

    附补丁:

    diff -ur a/qtbase/mkspecs/common/msvc-desktop.conf b/qtbase/mkspecs/common/msvc-desktop.conf --- a/qtbase/mkspecs/common/msvc-desktop.conf 2017-06-19 13:36:58 +0800 +++ b/qtbase/mkspecs/common/msvc-desktop.conf 2017-06-20 09:58:33 +0800 @@ -30,8 +30,8 @@ QMAKE_CFLAGS = -nologo -Zc:wchar_t QMAKE_CFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_OFF = -W0 -QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_OPTIMIZE -MD -QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -Zi -MD -QMAKE_CFLAGS_DEBUG = -Zi -MDd +QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_OPTIMIZE -MT +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -Zi -MT +QMAKE_CFLAGS_DEBUG = -Zi -MTd QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_LTCG = -GL diff -ur a/qtwebengine/src/3rdparty/chromium/third_party/angle/src/common/mathutil.cpp b/qtwebengine/src/3rdparty/chromium/third_party/angle/src/common/mathutil.cpp --- a/qtwebengine/src/3rdparty/chromium/third_party/angle/src/common/mathutil.cpp 2019-03-07 17:23:57 +0800 +++ b/qtwebengine/src/3rdparty/chromium/third_party/angle/src/common/mathutil.cpp 2019-03-07 17:23:57 +0800 @@ -72,9 +72,9 @@ { const RGB9E5Data inputData = reinterpret_cast<const RGB9E5Data>(&input);

    • *red = inputData->R * pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits);
    • *green = inputData->G * pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits);
    • *blue = inputData->B * pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits);
    • *red = inputData->R * (float)pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits);
    • *green = inputData->G * (float)pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits);
    • *blue = inputData->B * (float)pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits); }

    } // namespace gl diff -ur a/qtwebengine/src/3rdparty/chromium/build/config/BUILDCONFIG.gn b/qtwebengine/src/3rdparty/chromium/build/config/BUILDCONFIG.gn --- a/qtwebengine/src/3rdparty/chromium/build/config/BUILDCONFIG.gn 2019-03-07 17:23:57 +0800 +++ b/qtwebengine/src/3rdparty/chromium/build/config/BUILDCONFIG.gn 2019-03-27 14:05:29 +0800 @@ -545,7 +545,7 @@

    if (is_win) { default_compiler_configs += [

    • "//build/config/win:default_crt",
    • "//build/config/win:static_crt", "//build/config/win:lean_and_mean", "//build/config/win:nominmax", "//build/config/win:unicode", diff -ur a/qtwebengine/src/3rdparty/chromium/build/config/win/BUILD.gn b/qtwebengine/src/3rdparty/chromium/build/config/win/BUILD.gn --- a/qtwebengine/src/3rdparty/chromium/build/config/win/BUILD.gn 2019-03-07 17:23:57 +0800 +++ b/qtwebengine/src/3rdparty/chromium/build/config/win/BUILD.gn 2019-03-27 16:47:54 +0800 @@ -218,7 +219,7 @@ if (!use_vs_code_analysis) {

      This is required for ATL to use XP-safe versions of its functions.

      However it is prohibited when using /analyze

    • defines += [ "USING_V110_SDK71" ]
    • defines += [ "USING_V110_SDK71" ]

    }

    if (use_custom_libcxx) { diff -ur a/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/build/common.gypi b/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/build/common.gypi --- a/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/build/common.gypi 2019-03-07 17:23:57 +0800 +++ b/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/build/common.gypi 2019-03-27 16:27:47 +0800 @@ -323,7 +323,7 @@ '_CRT_NONSTDC_NO_WARNINGS', '_CRT_NONSTDC_NO_DEPRECATE', # This is required for ATL to use XP-safe versions of its functions.

    •      '_USING_V110_SDK71_',
      
    •      # '_USING_V110_SDK71_',
         ],
         'msvs_disabled_warnings': [4800],
         'msvs_settings': {
      

    diff -ur a/qtwebengine/src/3rdparty/chromium/third_party/brotli/BUILD.gn b/qtwebengine/src/3rdparty/chromium/third_party/brotli/BUILD.gn --- a/qtwebengine/src/3rdparty/chromium/third_party/brotli/BUILD.gn 2019-03-07 17:23:57 +0800 +++ b/qtwebengine/src/3rdparty/chromium/third_party/brotli/BUILD.gn 2019-03-27 14:07:15 +0800 @@ -170,7 +170,9 @@ if (is_win && visual_studio_version == "2015") { # Disabling "result of 32-bit shift implicitly converted to 64 bits", # caused by code like: foo |= (1 << i); // warning 4334

    •  cflags = [ "/wd4334" ]
      
    •  cflags = [ "/wd4334", "/MT" ]
      
    • } else {

    •  cflags = [ "/MT" ]
      

      }

      Always build release since this is a build tool.

    diff -ur a/qtwebengine/src/3rdparty/chromium/third_party/yasm/BUILD.gn b/qtwebengine/src/3rdparty/chromium/third_party/yasm/BUILD.gn --- a/qtwebengine/src/3rdparty/chromium/third_party/yasm/BUILD.gn 2019-03-07 17:23:57 +0800 +++ b/qtwebengine/src/3rdparty/chromium/third_party/yasm/BUILD.gn 2019-03-27 16:20:45 +0800 @@ -49,8 +49,8 @@ if (is_win) { # This switches to using the release CRT. On debug component builds of # highbd_sad4d_sse2.asm on Windows this saves about 15 s.

    • configs_to_delete += [ "//build/config/win:default_crt" ]
    • configs_to_add += [ "//build/config/win:release_crt" ]
    • configs_to_delete += [ "//build/config/win:default_crt" ]

    • configs_to_add += [ "//build/config/win:release_crt" ]

    } }

    diff -ur a/qtwebengine/src/3rdparty/ninja/configure.py b/qtwebengine/src/3rdparty/ninja/configure.py --- a/qtwebengine/src/3rdparty/ninja/configure.py 2019-03-07 17:23:57 +0800 +++ b/qtwebengine/src/3rdparty/ninja/configure.py 2019-03-27 14:04:40 +0800 @@ -305,7 +305,7 @@ '/nologo', # Don't print startup banner. '/Zi', # Create pdb with debug info. '/W4', # Highest warning level.

    •          '/WX',  # Warnings as errors.
      

    +# '/WX', # Warnings as errors. '/wd4530', '/wd4100', '/wd4706', '/wd4244', '/wd4512', '/wd4800', '/wd4702', '/wd4819', # Disable warnings about constant conditional expressions. @@ -320,6 +320,8 @@ '/wd4267', '/DNOMINMAX', '/D_CRT_SECURE_NO_WARNINGS', '/D_HAS_EXCEPTIONS=0',

    •     '/MT',
      
    •     '/D_DISABLE_DEPRECATE_LTL_MESSAGE',
               '/DNINJA_PYTHON="%s"' % options.with_python]
      
      if platform.msvc_needs_fs(): cflags.append('/FS')
    处置:完成(Done) 类型:提问 
    opened by ntp2000 2
  • VC-LTL FH4+x64+Debug访问非法地址导致的异常

    VC-LTL FH4+x64+Debug访问非法地址导致的异常

    为了更舒服的升级到 Windows 11 于是我前段日子开发了 NanaZip 并上架到了商店。

    当然 NanaZip 1.0 Preview 1 和 Preview 2 都有在根目录下右键时 100% 导致程序崩溃的问题 (也有用户提到了 https://github.com/M2Team/NanaZip/issues/12)

    经过排查,发现是 VC-LTL FH4 处理方面的 Bug 导致的(当然 19041 模式的 VC-LTL 因为直接使用 ucrtbase 的 FH4 实现于是没有问题)

    毛利

    类型:问题(Bug) 处置:完成(Done) 
    opened by MouriNaruto 2
  • 分享一下实际使用的体验以及对适用场景的分析(非bug)

    分享一下实际使用的体验以及对适用场景的分析(非bug)

    实际使用下来,我发现链接到msvcrt的好处在编写短小的命令行程序的时候很有效,这时候因为软件的体积本身就比较小,静态链接msvc运行库增加的体积就特别明显。

    但是一旦使用到比较庞大的软件上,而且不带一堆第三方动态库,而是全部静态链接到一起,体积也只能减少200到300KB,软件自身的体量就占大头了。

    所以我认为VC-LTL适用的场景应该是:

    • 携带大量dll形式的第三方库的软件,如果每一个dll都静态链接msvc运行库上去,那么体积增长会十分可观,这时候全部使用VC-LTL,可以获得最大的收益
    • 短小的命令行应用程序,静态链接msvc运行库带来的体积膨胀显著
    opened by Demonese 1
  • Win10 + VS2022 + CMake, Error

    Win10 + VS2022 + CMake, Error

    CMake Error:
    VC-LTL not load, because CMAKE_SYSTEM_NAME is not defined!!! Call Stack (most recent call first): VC-LTL helper for cmake.cmake:87 (include) CMakeLists.txt:19 (include)

    opened by dbyoung720 1
  • VC-LTL 在 Debug 模式下 ASAN 无法使用

    VC-LTL 在 Debug 模式下 ASAN 无法使用

    ASAN 即 Address Sanitizer,详细介绍可参阅 https://docs.microsoft.com/en-us/cpp/sanitizers/asan

    这个功能对于一些用户来说还是很有用的,该问题由友人 @FASTSHIFT 发现在使用了 VC-LTL 的 LVGL Windows 仿真器项目无法使用 ASAN 后,我进行粗略分析后做出的反馈

    注:由于 Release 模式下可以正常使用 ASAN,于是猜测和 VC-LTL 的 Debug Heap 实现有关

    附报错截图一份

    image

    复现参考环境

    • MSVC 2022 (14.30.30705)
    • VC-LTL v5.0.4-Beta1

    毛利

    类型:问题(Bug) 处置:正在讨论 影响范围:低 
    opened by MouriNaruto 2
Releases(v5.0.6-Beta2)
Owner
Chuyu Team
Chuyu Team official github
Chuyu Team
Simple one file header for hijacking windows version.dll for desired executable to do 3rd party modifying without dll injection.

Version-Hijack Simple one file header for hijacking windows version.dll for desired executable to do 3rd party modifying without dll injection. Usage

sneakyevil 6 Oct 19, 2022
I modified the colmap,when it reconstructs from known pose ,only let it optimize rotation ,fixing position!

Mapping-base-lidar-pose-or-vslam-pose I simply modified the colmap,when it reconstructs from known pose ,only let it optimize rotation ,fixing positio

李城(大橙子) 23 Dec 16, 2022
Optimize small uxntal programs via brute-force

Uxnbruteforce A small C program to optimize little pieces of uxntal code. It is a work in progress, a little bit messy for the moment :) I had the ide

Maxime ANDRÉ 6 Jan 9, 2022
DG-Mesh-Optimization - Discontinuous Galerkin (DG) solver coupled with a Quasi-Newton line-search algorithm to optimize the DG mesh.

Date written: December 2020 This project was pursued as my final project for MECH 579 (Multidisciplinary Design Optimization) at McGill University, ta

Julien Brillon 8 Sep 18, 2022
A high performance, shared memory, lock free, cross platform, single file, no dependencies, C++11 key-value store

SimDB A high performance, shared memory, lock free, cross platform, single file, no dependencies, C++11 key-value store. SimDB is part of LAVA (Live A

null 454 Dec 29, 2022
Collection of DLL function export forwards for DLL export function proxying

dll-exports Collection of DLL function export forwards for DLL export function proxying. Typical usecase is for backdooring applications for persisten

Magnus Stubman 58 Dec 6, 2022
A method from GH on how to stream a dll without touching disk, TAGS: fortnite cheat fortnite injector dll injector

dll-encryptor People who make pay hacks typically have down syndrome and are incapable of using their brains in any fashion, and yet these bath salt s

Micca 2 Nov 24, 2021
DLL Hooker using DLL Redirection

DLLHooker DLL Hooker using DLL Redirection. Development Environment IDE: Visual Studio 2019 Demonstration References [1] https://www.exploit-db.com/do

Jack Ren 1 Jan 21, 2022
Browser and NodeJS Web Assembly audio decoder libraries that are highly optimized for size and performance.

WASM Audio Decoders WASM Audio Decoders is a collection of Web Assembly audio decoder libraries that are highly optimized for browser use. Each module

Ethan Halsall 81 Jan 4, 2023
My new zigbee project. Wireless temperature and humidity mini sensor with electronic ink display 2.13 inches, low power consumption, compact size, enclosure with magnets.

My new zigbee project. Wireless temperature and humidity mini sensor with electronic ink display 2.13 inches, low power consumption, compact size, enclosure with magnets. The device use SHTC3 sensors, chip CC2530, battery CR2477.

Andrew Lamchenko 20 Nov 20, 2022
OSA a is minisatellite/ space probe the size of a can designed to participate in the ESA CanSat 2021 competition 🛰️ 📡 .

Project OSA OSA a is minisatellite/ space probe the size of a can designed to participate in the ESA CanSat 2021 competition ??️ ?? . Our project is c

OSATeam 11 Sep 30, 2022
esp32s2 implement a usb port display with 320*240 size with ~13pfs

esp32s2_usb_display overview it's a USB mini display for Linux platform, such as raspberry Pi, Centos X86 server. it refer many opensource projects: r

null 10 Oct 13, 2022
Tiny - low-level library for minimizing the size of your types

foonathan/tiny Note: This project is currently WIP, no guarantees are made until an 0.1 release. This project is a C++11 library for putting every las

Jonathan Müller 101 Oct 29, 2022
Example-application - Example out-of-tree application that is also a module

Zephyr Example Application This repository contains a Zephyr example application. The main purpose of this repository is to serve as a reference on ho

Zephyr Project 82 Dec 13, 2022
The Vulkan Profiles Tools are a collection of tools delivered with the Vulkan SDK for Vulkan application developers to leverage Vulkan Profiles while developing a Vulkan application

Copyright © 2021-2022 LunarG, Inc. Vulkan Profiles Tools (BETA) The Vulkan Profiles Tools are a collection of tools delivered with the Vulkan SDK for

The Khronos Group 73 Dec 25, 2022
A late bound, hope-for-the-best dyld shared cache extractor

yolo_dsc A late bound, hope-for-the-best dyld shared cache extractor why? There are other dsc_extract utilities. They usually require some combination

Rick Mark 14 Mar 17, 2022
It's a static library that's provide a way to do hooking (intercepting software components) in native shared object from some Android Packages

ARM_hook It's a static library that's provide a way to do hooking (intercepting software components) in native shared object from some Android Package

Gabriel Correia 1 Feb 17, 2022
Inject dll to explorer.exe and hide file from process.

Hide-FS Inject dll to explorer.exe and hide file from process. Requierments: Microsoft Detours Library - https://github.com/microsoft/Detours Compile:

null 12 Dec 26, 2022
Cobalt Strike Beacon Object File (BOF) that uses handwritten shellcode to return the process Environment strings without touching any DLL's.

Cobalt Strike "Where Am I?" Beacon Object File Cobalt Strike Beacon Object File (BOF) that uses handwritten shellcode to return the process Environmen

Bobby Cooke 92 Nov 30, 2022