zufuliu / llvm-utils

LLVM/Clang toolsets for Visual Studio 2022, 2019, 2017, 2015, 2013, 2012 and 2010.
Other
209 stars 35 forks source link

Use llvm-lib by default by setting UseLldLink to true #14

Closed gitoss closed 1 month ago

gitoss commented 1 month ago

When using "cmake -T LLVM_143", compiling with LTO on VS 2022 and LLVM 19 fails because UseLldLink isn't set to true in https://github.com/zufuliu/llvm-utils/blob/main/VS2017/LLVM/LLVM.Common.props

My current solution is to edit LLVM.Common.props - which works just fine, but isn't safe against future updates of llvm-utils reverting this edit.

zufuliu commented 1 month ago

Clang LTO does not work this way (separate executable for compile and link), see https://llvm.org/docs/LinkTimeOptimization.html#id4

clang -flto -c a.c -o a.o
clang -c main.c -o main.o
clang -flto -fuse-ld=lld a.o main.o -o main
gitoss commented 1 month ago

Clang LTO does not work this way (separate executable for compile and link), see https://llvm.org/docs/LinkTimeOptimization.html#id4

Sorry, I have to correct the bug ticket - the problem isn't dependent on LTO, but linking doesn't work at all unless llvm-tool's llvm-lib is used.

This is the actual problem - trying to compile SVT-AV1-PSY https://github.com/gianni-rosato/svt-av1-psy

Using the defult LLVM toolset of Visual Studio's LLVM 17 works just fine:

cmake --fresh -B svt_build_llvm17 -T ClangCL -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_APPS=ON -DENABLE_AVX512=ON -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" -DCMAKE_C_FLAGS_RELEASE="/DNDEBUG /clang:-O2 -march=native -Xclang -ffast-math"

But switching the toolset to llvm-tools for LLVM 19 produces a linker error unless "Use llvm-lib" is set to "Yes" in the GUI or see above.

cmake --fresh -B svt_build_llvm19 -T LLVM_143 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_APPS=ON -DENABLE_AVX512=ON -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" -DCMAKE_C_FLAGS_RELEASE="/DNDEBUG /clang:-O2 -march=native -Xclang -ffast-math"

The errors are like "2>ASM_AVX512.dir\Release\cdef_avx512.obj : fatal error LNK1107: invalid or corrupt file: cannot read at 0x1A34"

For simple me it seems that using -T LLVM_143 should enable using llvm-tool's llvm-lib by default.

zufuliu commented 1 month ago

I don't see any error with CMake 3.30.4 and VS 17.11.5. ALL_BUILD_x64

CMake output:

``` F:\Libs\svt-av1-psy>cmake --fresh -B svt_build_llvm19 -T LLVM_v143 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_APPS=ON -DENABLE_AVX512=ON -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" -DCMAKE_C_FLAGS_RELEASE="/DNDEBUG /clang:-O2 -march=native -Xclang -ffast-math" -- Building for: Visual Studio 17 2022 -- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.19045. -- The C compiler identification is Clang 19.1.1 with MSVC-like command-line -- The CXX compiler identification is Clang 19.1.1 with MSVC-like command-line -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: F:/Dev/LLVM/bin/clang-cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: F:/Dev/LLVM/bin/clang-cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test HAVE_X86_PLATFORM -- Performing Test HAVE_X86_PLATFORM - Success -- Performing Test HAVE_ARM_PLATFORM -- Performing Test HAVE_ARM_PLATFORM - Failed -- Looking for a ASM_NASM compiler -- Looking for a ASM_NASM compiler - D:/Dev/MSYS2/opt/bin/nasm.exe -- The ASM_NASM compiler identification is NASM -- Found assembler: D:/Dev/MSYS2/opt/bin/nasm.exe -- BUILD_SHARED_LIBS: OFF -- Checking C flag support for: [-Wformat-security] - Yes -- Checking C flag support for: [-Wformat] - Yes -- Checking C flag support for: [-Wextra] - Yes -- Checking CXX flag support for: [-Wformat-security] - Yes -- Checking CXX flag support for: [-Wformat] - Yes -- Checking CXX flag support for: [-Wextra] - Yes -- Checking C flag support for: [/W3] - Yes -- Checking CXX flag support for: [/W3] - Yes -- Checking C flag support for: [/MP] - Yes -- Checking CXX flag support for: [/MP] - Yes -- Checking C flag support for: [/Od] - Yes -- Checking CXX flag support for: [/Od] - Yes -- Looking for _mm512_extracti64x4_epi64 -- Looking for _mm512_extracti64x4_epi64 - found -- Looking for strnlen_s -- Looking for strnlen_s - found -- Looking for strncpy_s -- Looking for strncpy_s - found -- Looking for strcpy_s -- Looking for strcpy_s - found -- Looking for valgrind/valgrind.h -- Looking for valgrind/valgrind.h - not found -- Performing Test HAVE_BUILTIN_EXPECT -- Performing Test HAVE_BUILTIN_EXPECT - Success -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - not found -- Found Threads: TRUE -- Checking C flag support for: [-msse2] - Yes -- Checking CXX flag support for: [-msse2] - Yes -- Checking C flag support for: [-mssse3] - Yes -- Checking CXX flag support for: [-mssse3] - Yes -- Checking C flag support for: [-msse4.1] - Yes -- Checking CXX flag support for: [-msse4.1] - Yes -- Checking C flag support for: [-mavx2] - Yes -- Checking CXX flag support for: [-mavx2] - Yes -- Checking C flag support for: [/arch:AVX2] - Yes -- Checking CXX flag support for: [/arch:AVX2] - Yes -- Checking C flag support for: [-mavx512f] - Yes -- Checking C flag support for: [-mavx512bw] - Yes -- Checking C flag support for: [-mavx512dq] - Yes -- Checking C flag support for: [-mavx512vl] - Yes -- Checking CXX flag support for: [-mavx512f] - Yes -- Checking CXX flag support for: [-mavx512bw] - Yes -- Checking CXX flag support for: [-mavx512dq] - Yes -- Checking CXX flag support for: [-mavx512vl] - Yes -- Checking C flag support for: [/arch:AVX512] - Yes -- Checking CXX flag support for: [/arch:AVX512] - Yes -- Found PkgConfig: D:/Dev/MSYS2/mingw64/bin/pkg-config.exe (found version "2.3.0") -- Building with dovi support - No -- Building with hdr10plus support - No -- Configuring done (46.9s) -- Generating done (0.6s) -- Build files have been written to: F:/Libs/svt-av1-psy/svt_build_llvm19 F:\Libs\svt-av1-psy> ```

VS Build output:

``` Build started at 15:11... 1>------ Build started: Project: ZERO_CHECK, Configuration: Release x64 ------ 1>1>Checking Build System 2>------ Build started: Project: cpuinfo, Configuration: Release x64 ------ 3>------ Build started: Project: clog, Configuration: Release x64 ------ 4>------ Build started: Project: FASTFEAT, Configuration: Release x64 ------ 5>------ Build started: Project: EbVersionHeaderGen, Configuration: Release x64 ------ 4>Building Custom Rule F:/Libs/svt-av1-psy/third_party/fastfeat/CMakeLists.txt 3>Building Custom Rule F:/Libs/svt-av1-psy/third_party/cpuinfo/deps/clog/CMakeLists.txt 2>Building Custom Rule F:/Libs/svt-av1-psy/third_party/cpuinfo/CMakeLists.txt 3>clog.vcxproj -> F:\Libs\svt-av1-psy\svt_build_llvm19\third_party\cpuinfo\deps\clog\clog.dir\Release\clog.lib 5>Generating version header 5>-- Configured version: bb886b2 5>Building Custom Rule F:/Libs/svt-av1-psy/Source/Lib/Codec/CMakeLists.txt 2>F:\Libs\svt-av1-psy\third_party\cpuinfo\src\x86\windows\init.c(21,51): warning : unused parameter 'init_once' [-Wunused-parameter] 2>F:\Libs\svt-av1-psy\third_party\cpuinfo\src\x86\windows\init.c(21,68): warning : unused parameter 'parameter' [-Wunused-parameter] 2>F:\Libs\svt-av1-psy\third_party\cpuinfo\src\x86\windows\init.c(21,86): warning : unused parameter 'context' [-Wunused-parameter] 6>------ Build started: Project: GLOBALS, Configuration: Release x64 ------ 4>FASTFEAT.vcxproj -> F:\Libs\svt-av1-psy\svt_build_llvm19\third_party\fastfeat\FASTFEAT.dir\Release\FASTFEAT.lib 6>Building Custom Rule F:/Libs/svt-av1-psy/Source/Lib/Globals/CMakeLists.txt 2>cpuinfo.vcxproj -> F:\Libs\svt-av1-psy\svt_build_llvm19\third_party\cpuinfo\cpuinfo.dir\Release\cpuinfo.lib 2>Done building project "cpuinfo.vcxproj". 7>------ Build started: Project: C_DEFAULT, Configuration: Release x64 ------ 8>------ Build started: Project: CODEC, Configuration: Release x64 ------ 6>F:\Libs\svt-av1-psy\Source\Lib\Globals\metadata_handle.c(125,89): warning : comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'const EbAv1MetadataType' (aka 'const enum EbAv1MetadataType') [-Wsign-compare] 7>Building Custom Rule F:/Libs/svt-av1-psy/Source/Lib/C_DEFAULT/CMakeLists.txt 8>Building Custom Rule F:/Libs/svt-av1-psy/Source/Lib/Codec/CMakeLists.txt 6>GLOBALS.vcxproj -> F:\Libs\svt-av1-psy\svt_build_llvm19\Source\Lib\Globals\GLOBALS.dir\Release\GLOBALS.lib 9>------ Build started: Project: ASM_SSSE3, Configuration: Release x64 ------ 9>Building Custom Rule F:/Libs/svt-av1-psy/Source/Lib/ASM_SSSE3/CMakeLists.txt 7>C_DEFAULT.vcxproj -> F:\Libs\svt-av1-psy\svt_build_llvm19\Source\Lib\C_DEFAULT\C_DEFAULT.dir\Release\C_DEFAULT.lib 10>------ Build started: Project: ASM_SSE4_1, Configuration: Release x64 ------ 10>Building Custom Rule F:/Libs/svt-av1-psy/Source/Lib/ASM_SSE4_1/CMakeLists.txt 9>Assembling aom_subpixel_bilinear_ssse3.asm 9>Assembling aom_subpixel_8t_ssse3.asm 9>Assembling subpel_variance_ssse3.asm 8>F:\Libs\svt-av1-psy\Source\Lib\Codec\enc_dec_process.c(765,16): warning : use of NaN via a macro is undefined behavior due to the currently enabled floating-point options [-Wnan-infinity-disabled] 8>F:\Libs\svt-av1-psy\Source\Lib\Codec\enc_dec_process.c(790,16): warning : use of NaN via a macro is undefined behavior due to the currently enabled floating-point options [-Wnan-infinity-disabled] 8>F:\Libs\svt-av1-psy\Source\Lib\Codec\entropy_coding.c(3747,85): warning : comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'const EbAv1MetadataType' (aka 'const enum EbAv1MetadataType') [-Wsign-compare] 9>ASM_SSSE3.vcxproj -> F:\Libs\svt-av1-psy\svt_build_llvm19\Source\Lib\ASM_SSSE3\ASM_SSSE3.dir\Release\ASM_SSSE3.lib 11>------ Build started: Project: ASM_SSE2, Configuration: Release x64 ------ 11>Building Custom Rule F:/Libs/svt-av1-psy/Source/Lib/ASM_SSE2/CMakeLists.txt 11>Assembling aom_subpixel_8t_sse2.asm 11>Assembling highbd_intrapred_sse2_.asm 11>Assembling highbd_variance_impl_sse2.asm 11>Assembling intrapred_sse2.asm 11>Assembling picture_operators_sse2.asm 11>Assembling subpel_variance_sse2.asm 10>ASM_SSE4_1.vcxproj -> F:\Libs\svt-av1-psy\svt_build_llvm19\Source\Lib\ASM_SSE4_1\ASM_SSE4_1.dir\Release\ASM_SSE4_1.lib 12>------ Build started: Project: ASM_AVX512, Configuration: Release x64 ------ 11>Assembling subtract_sse2.asm 12>Building Custom Rule F:/Libs/svt-av1-psy/Source/Lib/ASM_AVX512/CMakeLists.txt 12>clang-cl : warning : argument unused during compilation: '/arch:AVX512' [-Wunused-command-line-argument] 12>clang-cl : warning : argument unused during compilation: '/arch:AVX512' [-Wunused-command-line-argument] 11>Assembling x64RegisterUtil.asm 12>clang-cl : warning : argument unused during compilation: '/arch:AVX512' [-Wunused-command-line-argument] 12>clang-cl : warning : argument unused during compilation: '/arch:AVX512' [-Wunused-command-line-argument] 12>clang-cl : warning : argument unused during compilation: '/arch:AVX512' [-Wunused-command-line-argument] 12>clang-cl : warning : argument unused during compilation: '/arch:AVX512' [-Wunused-command-line-argument] 12>clang-cl : warning : argument unused during compilation: '/arch:AVX512' [-Wunused-command-line-argument] 12>clang-cl : warning : argument unused during compilation: '/arch:AVX512' [-Wunused-command-line-argument] 12>clang-cl : warning : argument unused during compilation: '/arch:AVX512' [-Wunused-command-line-argument] 12>clang-cl : warning : argument unused during compilation: '/arch:AVX512' [-Wunused-command-line-argument] 12>clang-cl : warning : argument unused during compilation: '/arch:AVX512' [-Wunused-command-line-argument] 12>clang-cl : warning : argument unused during compilation: '/arch:AVX512' [-Wunused-command-line-argument] 12>clang-cl : warning : argument unused during compilation: '/arch:AVX512' [-Wunused-command-line-argument] 12>clang-cl : warning : argument unused during compilation: '/arch:AVX512' [-Wunused-command-line-argument] 12>clang-cl : warning : argument unused during compilation: '/arch:AVX512' [-Wunused-command-line-argument] 11>ASM_SSE2.vcxproj -> F:\Libs\svt-av1-psy\svt_build_llvm19\Source\Lib\ASM_SSE2\ASM_SSE2.dir\Release\ASM_SSE2.lib 13>------ Build started: Project: ASM_AVX2, Configuration: Release x64 ------ 13>Building Custom Rule F:/Libs/svt-av1-psy/Source/Lib/ASM_AVX2/CMakeLists.txt 13>Assembling itx_avx2.asm 12>ASM_AVX512.vcxproj -> F:\Libs\svt-av1-psy\svt_build_llvm19\Source\Lib\ASM_AVX512\ASM_AVX512.dir\Release\ASM_AVX512.lib 12>Done building project "ASM_AVX512.vcxproj". 8>F:\Libs\svt-av1-psy\Source\Lib\Codec\svt_threads.c(128,9): warning : cast from 'void *(*)(void *)' to 'LPTHREAD_START_ROUTINE' (aka 'unsigned long (*)(void *)') converts to incompatible function type [-Wcast-function-type-mismatch] 13>Assembling itx16_avx2.asm 8>CODEC.vcxproj -> F:\Libs\svt-av1-psy\svt_build_llvm19\Source\Lib\Codec\CODEC.dir\Release\CODEC.lib 8>Done building project "CODEC.vcxproj". 13>Assembling mc_avx2.asm 13>Assembling mc16_avx2.asm 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>clang-cl : warning : argument unused during compilation: '/arch:AVX2' [-Wunused-command-line-argument] 13>ASM_AVX2.vcxproj -> F:\Libs\svt-av1-psy\svt_build_llvm19\Source\Lib\ASM_AVX2\ASM_AVX2.dir\Release\ASM_AVX2.lib 13>Done building project "ASM_AVX2.vcxproj". 6>Done building project "GLOBALS.vcxproj". 14>------ Build started: Project: SvtAv1Enc, Configuration: Release x64 ------ 14>Building Custom Rule F:/Libs/svt-av1-psy/Source/Lib/CMakeLists.txt 14>SvtAv1Enc.vcxproj -> F:\Libs\svt-av1-psy\Bin\Release\Release\SvtAv1Enc.lib 15>------ Build started: Project: SvtAv1EncApp, Configuration: Release x64 ------ 15>Building Custom Rule F:/Libs/svt-av1-psy/Source/App/CMakeLists.txt 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(424,27): warning : 'strdup' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strdup. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\string.h(531,20): message : 'strdup' has been explicitly marked deprecated here 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\corecrt.h(428,50): message : expanded from macro '_CRT_NONSTDC_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(2657,24): warning : 'fscanf' is deprecated: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\stdio.h(1198,20): message : 'fscanf' has been explicitly marked deprecated here 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(356,55): message : expanded from macro '_CRT_INSECURE_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(2673,24): warning : 'fscanf' is deprecated: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\stdio.h(1198,20): message : 'fscanf' has been explicitly marked deprecated here 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(356,55): message : expanded from macro '_CRT_INSECURE_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(2691,18): warning : 'fscanf' is deprecated: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\stdio.h(1198,20): message : 'fscanf' has been explicitly marked deprecated here 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(356,55): message : expanded from macro '_CRT_INSECURE_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(2697,21): warning : 'fscanf' is deprecated: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\stdio.h(1198,20): message : 'fscanf' has been explicitly marked deprecated here 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(356,55): message : expanded from macro '_CRT_INSECURE_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(2702,18): warning : 'fscanf' is deprecated: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\stdio.h(1198,20): message : 'fscanf' has been explicitly marked deprecated here 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(356,55): message : expanded from macro '_CRT_INSECURE_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(2708,21): warning : 'fscanf' is deprecated: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\stdio.h(1198,20): message : 'fscanf' has been explicitly marked deprecated here 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(356,55): message : expanded from macro '_CRT_INSECURE_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(2713,18): warning : 'fscanf' is deprecated: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\stdio.h(1198,20): message : 'fscanf' has been explicitly marked deprecated here 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(356,55): message : expanded from macro '_CRT_INSECURE_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(2719,21): warning : 'fscanf' is deprecated: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\stdio.h(1198,20): message : 'fscanf' has been explicitly marked deprecated here 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(356,55): message : expanded from macro '_CRT_INSECURE_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(2725,17): warning : 'fscanf' is deprecated: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\stdio.h(1198,20): message : 'fscanf' has been explicitly marked deprecated here 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(356,55): message : expanded from macro '_CRT_INSECURE_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(2731,26): warning : 'fscanf' is deprecated: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\stdio.h(1198,20): message : 'fscanf' has been explicitly marked deprecated here 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(356,55): message : expanded from macro '_CRT_INSECURE_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(2736,17): warning : 'fscanf' is deprecated: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\stdio.h(1198,20): message : 'fscanf' has been explicitly marked deprecated here 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(356,55): message : expanded from macro '_CRT_INSECURE_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(2741,26): warning : 'fscanf' is deprecated: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\stdio.h(1198,20): message : 'fscanf' has been explicitly marked deprecated here 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(356,55): message : expanded from macro '_CRT_INSECURE_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(2746,17): warning : 'fscanf' is deprecated: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\stdio.h(1198,20): message : 'fscanf' has been explicitly marked deprecated here 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(356,55): message : expanded from macro '_CRT_INSECURE_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(2751,26): warning : 'fscanf' is deprecated: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\stdio.h(1198,20): message : 'fscanf' has been explicitly marked deprecated here 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(356,55): message : expanded from macro '_CRT_INSECURE_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>F:\Libs\svt-av1-psy\Source\App\app_config.c(2756,17): warning : 'fscanf' is deprecated: This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 15>D:\Windows Kits\10\Include\10.0.26100.0\ucrt\stdio.h(1198,20): message : 'fscanf' has been explicitly marked deprecated here 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(356,55): message : expanded from macro '_CRT_INSECURE_DEPRECATE' 15>D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.41.34120\include\vcruntime.h(346,47): message : expanded from macro '_CRT_DEPRECATE_TEXT' 15>SvtAv1EncApp.vcxproj -> F:\Libs\svt-av1-psy\Bin\Release\Release\SvtAv1EncApp.exe 15>Done building project "SvtAv1EncApp.vcxproj". 16>------ Build started: Project: ALL_BUILD, Configuration: Release x64 ------ 16>Building Custom Rule F:/Libs/svt-av1-psy/CMakeLists.txt 17>------ Skipped Build: Project: INSTALL, Configuration: Release x64 ------ 17>Project not selected to build for this solution configuration ========== Build: 16 succeeded, 0 failed, 0 up-to-date, 1 skipped ========== ========== Build completed at 15:12 and took 01:21.288 minutes ========== ```
zufuliu commented 1 month ago

with CMake 3.30.4 and VS 17.11.5.

for git clone --depth=1 https://github.com/gianni-rosato/svt-av1-psy.git at https://github.com/gianni-rosato/svt-av1-psy/commit/bb886b2936a4020c9ff2e05fd5ceb6f0ba8c8f39

gitoss commented 1 month ago

with CMake 3.30.4 and VS 17.11.5.

OK, I'll have a look again, thanks for checking.

I am not using the cmake provided by VS, but the latest one installed with scoop - that might be the problem.

gitoss commented 1 month ago

with CMake 3.30.4 and VS 17.11.5.

OK, I'll have a look again, thanks for checking.

I haven't enough time to re-create the default settings atm, so I'm closing the ticket - it'll still be there for reference if I'm not the only one.