Skip to content

[vs_platform_toolset msbuild] MSVC ClangCL [Only TEST, no merge]#11140

Closed
MVoz wants to merge 67 commits intomicrosoft:masterfrom
MVoz:VS_Platform_ToolSet-ClangCl-&-Intel
Closed

[vs_platform_toolset msbuild] MSVC ClangCL [Only TEST, no merge]#11140
MVoz wants to merge 67 commits intomicrosoft:masterfrom
MVoz:VS_Platform_ToolSet-ClangCl-&-Intel

Conversation

@MVoz
Copy link
Contributor

@MVoz MVoz commented May 3, 2020

Only TEST, no merge

test only triplet x64-windows, only msbuild project and cmake -T"" msbuild // CMAKE_GENERATOR "Visual Studio"

LilyWangL and others added 30 commits May 3, 2020 01:09
* [ffmpeg] Fix ffmpeg[opencl, openssl] static build failed

* [ffmpeg] Fix ffmpeg/CONTROL[lzma] static build failed

* Fix conflict

* Fix conflict

* Fix conflict

* [ffmpeg] Remove include(vcpkg_common_functions)

* Remove include(vcpkg_common_functions)

* [ffmpeg] Fix patch apply failed

* Fix conflict

* [ffmpeg] Fix conflict

* [ffmpeg] Fix patch
* Fix boost modular build for ARM64 builds on Linux

* Add error message

* Fix endif error

* Fix typo in error msg

* Bump up version
* add new function vcpkg_fixup_pkgconfig

* make message with changed files a debug_message

* add two more cases to the debug *.pc files

* comment out prefix.
use --define-variable=prefix=INSTALL_PATH

* changed the comment header.

* add missing word

* finish vcpkg_fixup_pkgconfig.cmake

* Update vcpkg_fixup_pkgconfig.cmake

Note: since CMake is run in script mode the description of VCPKG_FIXUP_PKGCONFIG_CALLED cannot be viewed

* transfer changes from x windows pr

* fix typo in regex

* make the regex comment aware
make pc files relocatable by using ${pcfiledir} in prefix
tested with x window pr
* [opencc] Add new port

* [opencc] Update to 2019-10-09

* [opencc] Minor update

* [opencc] Modernize

* [opencc] Update to 2020-04-26

* [opencc] Bypass arm64-windows

* [opencc] Modernize

* [opencc] Rebuild on osx
* [uchardet] Add new port

* [uchardet] Fix string no output variable error

[uchardet] Update homepage

* [uchardet] Fix tool build error on Windows

* [uchardet] Update

* [uchardet] Modernize

* [uchardet] Update to 2020-04-26

* [uchardet] Fix static build

* [uchardet] Fix UWP build
…10476)

* [vcpkg] Add support for VCPKG_BINARY_SOURCES and --binarysource=<>

* [vcpkg] Rename --binarysource to --x-binarysource to denote internal/experimental

* [vcpkg] Address review comments & add tests for BinaryConfigParser

* [vcpkg] Replace do {} while(1); with for(;;)

Avoids conditional expresion is constant warnings

* [vcpkg] Invert if/else

* [vcpkg] Fix warning in export.prefab.cpp

* [vcpkg] Resolve merge regressions
* Do not disable expression decomposition in some optional tests

The tests are trivial enough that it is unlikely to come useful,
but the old usage is bad practice.

* Run tests in random order

This should prevent committing tests that are run-order dependent,
or at least shake them out eventually in CI.
There's some conflict with something else.
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
The freetype dependencies libpng and bzip2 are not required for the functionality of harfbuzz.
* [pcl] Fix link to libpng

* [pcl] Format code
…5-declarative (#11045)

This is required so that qt5-tools is not skipped in CI which affects CI coverage.
In general Qt5 ports should not be build apart from each other but as complete package!
Or VCPKG should accept installing duplicated *.dll in every folder excebt for /bin or debug/bin
* [armadillo] Add dependent port superlu on osx

* [armadillo] Suppress automatic dependency enablement

* [mlpack] Re-enable in CI

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
* Update vcpkg_build_msbuild.cmake

* Update vcpkg_install_msbuild.cmake

* Update CONTROL

* Update CONTROL

* Update portfile.cmake

* Update portfile.cmake

* Update ci.baseline.txt
* [libqcow] Add new port

Signed-off-by: Alexandro Sanchez Bach <alexandro@phi.nz>

* [libqcow] fix build

Co-authored-by: Alexandro Sanchez Bach <asanchez@kryptoslogic.com>
Adds a patch changing macros in absl/base/options.h to
always use the std:: namespace types instead of the
absl:: namespace replacements (for any, optional,
string_view, variant).
The upstream version of options.h uses compiler/library
feature detection to decide this, but patch
fix-lnk2019-error.patch hard codes use of absl:: types,
thus rendering setting CMAKE_CXX_STANDARD to 17 in the
port file ineffective. Since auto detection is problematic
from an ABI point of view (see comments in
absl/base/options.h for details), this applies an
alternate patch for fix-lnk2019-error.patch when feature
cxx17 is enabled.
* Add ARROW_FILESYSTEM feature

* update arrow version
* [alembic] make the portfile linux-compatible

* [alembic] fix build error in debug on linux

* [alembic] simplify renaming of copyright file

* [alembic] code simplification and formatting

* [alembic] update version to 1.7.12-1

* [alembic] linux build does not fail anymore
* [mstch] add new port

* [mstch] update sha512 code

* [mstch] don't build in some window environment

* [mstch] remove some args which were no longer needed

* [mstch] Patch out forcing build type

* [mstch] Restore C++11 on non-Windows

* [ci.baseline.txt] Mark mstch as passing on x64-windows-static

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
…ure Spot

* Adds scripts to generate scale sets for testing Linux.
    * Note workaround for microsoft/azure-pipelines-agent#2929
* Switches Windows validation to 'Spot' VMs.
* Opens the git port 9418.
* Removes provisioning of the no longer used 'logs' file share.
* Changes Azure region to 'westus2', which is cheaper.
* Adds +x to all the scripts in scripts/azure-pipelines.
* Use 'xml-results' for all platforms instead of 'raw xml results' on Windows.
@Neumann-A
Copy link
Contributor

In general that many changes are not required.

what you can do is use the following triplet:

set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
if(DEFINED VCPKG_PLATFORM_TOOLSET)
 # this lets vcpkg initialize the normal VS enviroment 
 # before switching to llvm while building the ports
 set(VCPKG_PLATFORM_TOOLSET llvm) # requires llvm extension in vs
else()
 set(VCPKG_PLATFORM_TOOLSET v142) # only required if you don't want to use vcpkg auto detection
endif()
set(VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK enabled) # required to skip missing 2.linker member error
# For ninja and other ports:
set(ENV{CC} "<path/to/clang-cl>")
set(ENV{CXX} "<path/to/clang-cl>")

@MVoz
Copy link
Contributor Author

MVoz commented May 3, 2020

Comment on lines +154 to +160
"/p:UseClangCl=true"
"/p:UseLldLink=true"
"/p:UseLlvmLib=false"
"/p:TrackFileAccess=false"
"/p:LibToolExe=lib.exe"
"/p:ClangClAdditionalOptions=-Wno-gcc-compat -Xclang -fopenmp -Xclang -flto=thin -Wextra -Wno-unused-variable -verbose"
"/p:LldLinkAdditionalOptions=-debug -force:multipleres -fuse-ld=lld-link -lib"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should probably be VCPKG_ADDITIONAL_MSBUILD_OPTIONS so they get settable from the triplet

list(APPEND _csc_OPTIONS
"/p:ForceImportBeforeCppTargets=${SCRIPTS}/buildsystems/msbuild/vcpkg.targets"
"/p:VcpkgApplocalDeps=false"
"/p:VcpkgTriplet=${TARGET_TRIPLET}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. That one is truely missing.

@MVoz
Copy link
Contributor Author

MVoz commented May 3, 2020

@Neumann-A
how do I merge extra commits ?)))

@Neumann-A
Copy link
Contributor

I normally do

git remote add <somename> <someupstreamgit>
git fetch <somename>
git merge <somename>/<somebranch>

If the remote is already added the first command can be skipped
So for vcpkg master I normally do:

git remote add upstream https://github.com/microsoft/vcpkg.git
git fetch upstream
git merge upstream/master

the first command is normally skipped since I already added the upstream remote add some point earlier.

@MVoz
Copy link
Contributor Author

MVoz commented May 3, 2020

if(DEFINED VCPKG_PLATFORM_TOOLSET)

this lets vcpkg initialize the normal VS enviroment

before switching to llvm while building the ports

set(VCPKG_PLATFORM_TOOLSET llvm) # requires llvm extension in vs
else()
set(VCPKG_PLATFORM_TOOLSET v142) # only required if you don't want to use vcpkg auto detection
endif()

this won't work, MSBUILD needs to have two Platformtoolsets \ BasePlatformtoolsets

https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-specifying-a-base-platform-toolset-with-the-intel-c-compiler

Msbuild.exe myproject.vcxproj /p:PlatformToolset="Intel C++ Compiler 19.1" /p:BasePlatformToolset=v141

@MVoz
Copy link
Contributor Author

MVoz commented May 3, 2020

@Neumann-A
Copy link
Contributor

I use this
https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain
or now this for VS 2019
https://marketplace.visualstudio.com/items?itemName=MarekAniola.mangh-llvm2019

/p:BasePlatformToolset=v141

introduce VCPKG_ADDITIONAL_MSBUILD_OPTIONS and you can pass whatever you like via the triplet file. But more importantly would be to have something like VCPKG_ENVIROMNENT_SETUP_SCRIPT for the Intel compiler

@MVoz
Copy link
Contributor Author

MVoz commented May 3, 2020

extension installed cmd
https://github.com/zufuliu/llvm-utils/blob/master/VS2017/install.bat

https://github.com/zufuliu/notepad2/blob/master/build/install_llvm.bat

@ECHO OFF
@rem used on AppVeyor

curl -Ls -o "LLVM_VS2017.zip" "https://github.com/zufuliu/llvm-utils/releases/download/v20.03/LLVM_VS2017.zip"
7z x -y "LLVM_VS2017.zip" >NUL
CALL "LLVM_VS2017\install.bat" %1

@BillyONeal
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MVoz
Copy link
Contributor Author

MVoz commented May 6, 2020

@BillyONeal
The build tools for ClangCL (Platform Toolset = 'ClangCL') cannot be found. To build using the ClangCL build tools, please install ClangCL build tools.

not installed in Ci
C++ Clang tools for Windows , C++ Clang-cl for v142 build tools
https://docs.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=vs-2019

close PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.