Граф коммитов

42 Коммитов

Автор SHA1 Сообщение Дата
Helena Kotas 1eaf88b374
TAEF cmake fixes (#3290)
- prioritize TAEF path from environment variable
- find TAEF binaries based on the header location
2020-12-01 18:51:35 -08:00
Helena Kotas 6008113f60
Support for ARM64EC and custom cmake (#3245)
* Merged PR 5375287: Support for ARM64EC and custom cmake

* Fix linux build break

* Change argument name to -dxc-cmake
2020-11-06 14:46:44 -08:00
Helena Kotas 1bd73bdc00
Fix DIA SDK detection for ARM64 and VS2017 (#3239) 2020-11-03 17:58:55 -08:00
Helena Kotas 075d3ce9ef
Fix DIA SDK detection (#3231) 2020-11-02 09:35:00 -08:00
Helena Kotas c565b3d20b
Cleanup and minor changes to improve integration with internal projects (#3199)
* Cleanup and minor changes to improve integration with internal projects

Adds -Debug option to hcttest.cmd

* Case insensitive compare for -Debug and -Release flags in hctbuild and hcttest
2020-10-13 16:22:50 -07:00
Helena Kotas b3d9c8af6a
DIA SDK lookup fixes (#3179)
- Build platform is not included generator string for VS2019; use CMAKE_GENERATOR_PLATFORM instead
- Use release version of VS by default
2020-10-05 15:51:37 -07:00
Helena Kotas bf5d585492
Enable Visual Studio 2019 build by default (#3138)
This PR is switching the default build of DXC to Visual Studio 2019.
The build script hctbuild.cmd will error when VS2019 is not installed. Use -vs2017 option to build with VS2017.
VS2015 is no longer supported.

Removes cmake version checking from hctstart.cmd
Fixes cmake detection in Visual Studio installations
Fixes DIA SDK lookup - use CMAKE_GENERATOR to detect VS version used and select the corresponding DIA SDK
Use environment variable instead of c:\Program Files
2020-09-17 17:42:08 -07:00
Helena Kotas 068ddf8884
Enable TAEF path specification via environment variable (#2778) (#2898) 2020-05-21 19:04:32 -07:00
Minmin Gong a5365731f0
Change HLSL_DISABLE_DEBUG_ITERATORS to more natural HLSL_ENABLE_DEBUG_ITERATORS and flip the default value (#2885) 2020-05-14 10:29:56 -05:00
Minmin Gong 318e625924
Add an option to turn on/off debug iterators (#2879)
Add option to turn on/off debug iterators for more performant or more helpful debug builds
2020-05-13 11:00:35 -07:00
Helena Kotas 3049f4541b
CMake customization and bug fixes (#2874)
Add new options to hctbuild that enable passing in additional arguments to cmake invocation
and also cmake customization hooks that will be included at the beginning and end of DXC's CMakeLists.txt.

Rework library search in FindD3D12.cmake and add one more library to look for.

Fix case in FindDiaSDK.cmake - fixes a cmake warning.
2020-05-11 12:23:20 -07:00
JohnMcPMS c3862216b8 Enable non-C VS installs (#2463)
* Move to use vswhere for 2017/2019 and add const to make 2019 STL happy

* Add hardcoded 2017 paths back as vswhere was not in 2017 from the beginning
2019-09-17 17:13:38 -07:00
Jaebaek Seo 982d8fcc25
Support UUID for clang build (#2404)
Linux build emulated UUID because of the lack of UUID support, but
clang indeed supports it. This CL allows clang to use UUID.
2019-08-14 13:41:27 -04:00
Helena Kotas 35fa5073b3
Enable versioning for all tools (#2324) 2019-07-10 09:29:10 -07:00
Michael Kenzel 1de231bd50 Fix resource compilation flag (#2321) 2019-07-09 10:11:07 -07:00
Helena Kotas 5edbabb2b1
Generate new version for each DX Compiler build (#2200)
Added generating of new version for each DX Compiler build. 

There are 3 kinds of version:
1. **Official build**
Built by using `hctbuild -official`. The version is based on the current DXIL version, latest official release and a number of commits since then. The format is `dxil_major.dxil_minor.release_no.commit_count`. For example a current official version would be something like `1.5.1905.42`. The latest release information is read from `utils\version\latest-release.json`. The `1905` corresponds to `dxil-2019-05-16` release branch and `42` is the number of commits since that release branch was created. For master branch the `commit_count` will be incremented by 10000 to distinguish it from stabilized official release branch builds. So the current official version of master would be someting like `1.5.1905.10042`.

2. **Dev build**
Build by using `hctbuild` with no other version-related option. The format is `dxil_major.dxil_minor.0.commit_count` where commit_count is the number of total commits since the beginning of the project.

3. **Fixed version build**
Build by using `hctbuild -fv`. Enables overriding of the version information. The fixed version is read from `utils\version\version.inc`. Location of the version file can be overriden by `-fvloc` option on `hctbuild`.

In addition to the numbered version the product version string on the binaries will also include branch name and last commit sha - `"1.5.1905.10042 (master, 47e31c8a)"`. This product version string is included in `dxc -?` output.
2019-06-28 15:16:34 -07:00
Greg Roth 8ebb86399d Hide Unix symbols by default (#2213)
* Hide Unix symbols by default

Using the -fvisibility=hidden by default only exposes symbols that have
the __attribute__((visibility("default"))) attribute applied to them.
There are only a couple of functions that are meant to be exposed from
libdxcompiler. To expose the proper functions, the macros used to create
the UUIDs for class types are redefined with the attribute and
DXC_API_IMPORT is defined with the attribute above for non-windows
platforms.

Since we're hiding everything now, the portions that were explicitly
hidden to make MacOS work are removed.

This exposed a number of missing dependencies of libraries and unit
tests. Namely clang-hlsl-tests, clang-spirv-tests, and libclangCodeGen.

Resolves #2203

* Remove explicit marking of DxcThreadMalloc hidden

This was a workaround that is not longer necessary since all symbols are
hidden by default on Unix platforms now.
2019-05-29 12:56:02 -04:00
Minmin Gong 2dc416fc6b Enable to detect DIA SDK in VS2019 (#2136) 2019-05-23 11:25:14 -07:00
Helena Kotas fdd4e3b0e6
Update version to 2019.05.00 (#2194) 2019-05-16 11:39:39 -07:00
Helena Kotas 8957ca258e
Update version to 2019-03-29 (#2082)
* Update version to 2019-03-29

* Changing to 2019-03-00 in master. Will go back to 2019-03-29 in the dxil-2019-03-29 branch.
2019-03-29 12:20:22 -07:00
Helena Kotas 6b8657531d
Enable detection of Win10 SDK from environment variable instead of registry (#1832)
Fix typo
2019-01-11 11:01:45 -08:00
Bart House dc4ba7e3b0 Use program files x86 environment variable when looking for vs15 install (#1785)
Use program files x86 environment variable when looking for vs15 install
2018-12-21 10:08:04 -08:00
Lei Zhang efb45575db
Resolve compiler warnings on Linux and macOS (#1628)
* Removed unused functions and fields
* Turned off switch enumeration value not handled warnings
* Fixed initialization issues
2018-10-25 11:08:12 -04:00
Helena Kotas 4e0ce03e8b Update version to 2018.08 2018-08-16 10:25:07 -07:00
Helena Kotas c3587a82fb
Update to VS 2017 and CMake 3.11.2 (#1347)
* Change build to prefer VS 2017

* Update supported cmake version

* Remove -vs2017 from appveyor.yml
2018-06-08 17:36:55 -07:00
Helena Kotas 7fd91d777f
Modify build script and environment to support ARM64 build (#1308)
hctstart.cmd and hctbuild.cmd now support ARM64 builds.

Note that building ARM64 build on x86/x64 machine needs a location
of x86/x64 version of TableGen tools (clang-tblgen and llvm-tblgen).
Before starting ARM64 build set the BUILD_TBLGEN_PATH to point to
the TableGen binaries or use the -tblgen option on hctbuild.cmd.

Also had to rearrange control flow around the cmake --build call
in hctbuild.cmd due to a flaky batch behavior around brackets.
2018-06-08 13:06:48 -07:00
Greg Roth f8fa9c92a0 [linux-port] disable covered-switch-default warning (#1332)
Defaults in switch statments can mask warnings that might
indicate that a new enum value was added and corresponding changes
to a switch statement that relies on that enum are missed. For this
reason, clang reports when switch statements that fully define case
statements for all possible enum values contain default: statements.

However, this is a warning of a potential problem that might arise
from future changes to the code rather than anything that might be
wrong now. Additionally, while unlikely that an enum switch might
be presented with a value that isn't valid for that enum, it isn't
impossible. So rather than respect this warning, we will silence it.
It's not included by default. LLVM wanted it. We don't, so it's
removed. This makes the earlier external cmake change unnecessary.
Ignores 34 clang warnings
2018-06-04 05:53:02 +08:00
Ehsan 37c35f2f6e
[linux-port] Update CMake files. prepare for Linux. (#1312)
This CL makes changes to CMake files in order to:
1- disable things that are not supported on non-Windows platforms.
2- make cross-platform compilation possible.

It also brings back LLVM's config.guess (mirrors:
https://github.com/llvm-mirror/llvm/blob/master/cmake/config.guess)
2018-05-29 15:19:37 -04:00
Vishal C Sharma 6e3ece5ee8 Update global cmake exe linker flag to emit pdbs in release mode 2018-05-23 17:07:14 -07:00
Young Kim 8ba7f5a200
Clean up for versions (#829)
-bump up dll version for fixed version
-show dxcompiler and dxil version number for dxc help message
-emit warnings for dxcompiler validator that container will not be signed
2017-11-20 11:09:28 -08:00
Young Kim 85409901ff Update version to 2017 10 (#703)
Updating dxcompiler file version and llvm.ident version to 2017 10 for new release.
2017-10-13 10:45:08 -07:00
Lei Zhang f96f92d711 [spirv] Update SPIR-V dependencies and disable debug iterators (#574) 2017-08-16 21:11:48 -07:00
Marcelo Lopez Ruiz 669635dec7 Fix dense map grow case with exceptions (#529)
This fixes the OOM test that was failing under Release configuration.
2017-08-05 21:47:10 -07:00
Marcelo Lopez Ruiz 73ef58933c Fix te discovery from external dir, including x64/amd64 usage. (#407) 2017-07-07 16:47:57 -07:00
Marcelo Lopez Ruiz 23f9b82096 Fix debug flags for non-debug VS builds (#364)
The DBG define was set even for release builds.
2017-06-16 19:48:13 -07:00
Marcelo Lopez Ruiz ff210c4abf add support for overriding version strings in llvm.ident and resources (#354)
Typically this functionality will be triggered via lab automated builds in preparation for a release.

hctbuild supports the required flag already via the -fv switch.
2017-06-14 18:00:54 -07:00
Lei Zhang 3c6537a7d5 [spirv] Add GoogleTest as an external dependency (#285)
GoogleTest will be used for unit testing and codegen testing for
SPIR-V.

* Added SPIRV_BUILD_TESTS option in CMake to control building
  of SPIR-V tests.
* Added "-spirvtest" into hctbuild to enable it.
* Added "spirv" and "spirv_only" targets for hcttest.

Running `hcttest spirv` will run ALL tests including SPIRV tests.
Running `hcttest spirv_only` will ONLY run SPIRV tests.

The default behavior of hctbuild and hcttest is not changed.
2017-05-22 12:02:23 -07:00
Lei Zhang 47706a1bcc Support Ninja as the generator (#203) 2017-04-12 14:15:24 -07:00
Marcelo Lopez Ruiz 2cce7933fb Add support for an inline TAEF install rather than requiring WDK (#196)
Adds support for SDK 10.0.15063.0.
Adds support for TAEF download into external dir, no WDK required.
2017-04-10 22:53:37 -07:00
David Peixotto 7a24bac9b5 Add support for AppVeyor continuous integration (#131)
This commit makes the necessary changes to run the project with AppVeyor
CI. The `appveyor.yml` file contains the configuration settings for the
build. Currently we only build x64-Debug, but we can build the full
x32/x64-Debug/Release matrix by adding a few lines to the config.

The remaining changes are somewhat tied to the specifics of how appveyor
provisions the build machines. The standard VS2015 machines build on
Windows Server 2012. We can build on these machines, but cannot run tests
because we require d3d12.dll which is not available on Windows Server
2012. However, it is present on Windows Server 2016, but appveyor only
provides VS2017 on those machines. So part of the changes are to allow
the compiler to build with VS2017 so we can run tests as part of CI.

The `appveyor_setup.ps1` script installs the WDK as part of the build.
This is the only extra software we need. It is actually installed on the
VS2015 build machines, but not our VS2017 build machines. Perhaps we can
get them to install it by default and then this script can go away.

The `appveyor_test.ps1` script runs the taef tests and then reports the
results to appveyor so they can be displayed on the "Tests" tab.

As a side effect of this work, We can now use the latest cmake (3.7.2) for
our own builds! The key seems to be setting
`-DCMAKE_SYSTEM_VERSION=10.0.14393.0` to ensure that we pick up the
correct SDK.
2017-03-13 16:21:15 -07:00
David Peixotto f805233b49 Revert license text in banner comments to original llvm verbage (#33)
Fix #30: Revert license text in banner comments to original llvm verbage

This commit removes the Microsoft-specific copyright in llvm files
and reverts the copyright wording to the original llvm wording.

We used the following method to find the files to change:
1. Find all files in DirectXShaderCompiler that are also in llvm 3.7
2. For those files that have the Microsoft-specific copyright, revert
   it to the original llvm copyright as present in llvm 3.7
3. Revert the copyright in a few files that are not in llvm, but are
   mostly copies of files in llvm:
	lib\Transforms\Scalar\ScalarReplAggregatesHLSL.cpp
	lib\Transforms\Scalar\Reg2MemHLSL.cpp

Leave the Microsoft-specific copyright header in files not present
in stock llvm:

    include\dxc\*
    lib\HLSL\*
    lib\DxcSupport\*
    tools\clang\test\HLSL\*
    tools\clang\test\CodeGenHLSL\*
    tools\clang\unittests\HLSL\*
    tools\clang\unittests\HLSLHost\*
    tools\clang\tools\dxcompiler\*
    tools\clang\tools\dxa\*
    tools\clang\tools\dxc\*
    tools\clang\tools\dxopt\*
    tools\clang\tools\dxr\*
    tools\clang\tools\dxv\*
    tools\clang\tools\dotnetc\*
    utils\hct\*
    CONTRIBUTING.md
    COPYRIGHT
    LICENSE-MIT
    README.md
    cmake\modules\FindD3D12.cmake
    cmake\modules\FindDiaSDK.cmake
    cmake\modules\FindTAEF.cmake
    docs\DXIL.rst
    docs\HLSLChanges.rst
    docs\_themes\dxc-theme\layout.html
    docs\_themes\dxc-theme\theme.conf
    docs\_themes\dxc-theme\static\dxc-theme.css
    include\llvm\llvm_assert\assert.h
    include\llvm\llvm_assert\cassert
    include\llvm\Support\MSFileSystem.h
    include\llvm\Support\OacrIgnoreCond.h
    lib\MSSupport\CMakeLists.txt
    lib\MSSupport\MSFileSystemImpl.cpp
    lib\Support\assert.cpp
    lib\Support\MSFileSystemBasic.cpp
    lib\Support\Windows\MSFileSystem.inc.cpp
    lib\Transforms\Scalar\Reg2MemHLSL.cpp
    lib\Transforms\Scalar\ScalarReplAggregatesHLSL.cpp
    tools\clang\docs\UsingDxc.rst
    tools\clang\include\clang\AST\HlslTypes.h
    tools\clang\include\clang\Basic\BuiltinsDXIL.def
    tools\clang\include\clang\Basic\LangOptions.fixed.def
    tools\clang\include\clang\Parse\ParseHLSL.h
    tools\clang\include\clang\Sema\SemaHLSL.h
    tools\clang\lib\AST\ASTContextHLSL.cpp
    tools\clang\lib\AST\HlslTypes.cpp
    tools\clang\lib\CodeGen\CGHLSLMS.cpp
    tools\clang\lib\CodeGen\CGHLSLRuntime.cpp
    tools\clang\lib\CodeGen\CGHLSLRuntime.h
    tools\clang\lib\Frontend\Rewrite\FrontendActions_rewrite.cpp
    tools\clang\lib\Parse\HLSLRootSignature.cpp
    tools\clang\lib\Parse\HLSLRootSignature.h
    tools\clang\lib\Parse\ParseHLSL.cpp
    tools\clang\lib\Sema\gen_intrin_main_tables_15.h
    tools\clang\lib\Sema\SemaHLSL.cpp
    tools\clang\tools\d3dcomp\CMakeLists.txt
    tools\clang\tools\d3dcomp\d3dcomp.cpp
    tools\clang\tools\d3dcomp\d3dcomp.def
    tools\clang\tools\libclang\dxcisenseimpl.cpp
    tools\clang\tools\libclang\dxcisenseimpl.h
    tools\clang\tools\libclang\dxcrewriteunused.cpp
    tools\clang\tools\libclang\libclang.rc
    tools\dxexp\CMakeLists.txt
    tools\dxexp\dxexp.cpp
    tools\dxexp\LLVMBuild.txt
2017-01-24 17:54:00 -08:00
Marcelo Lopez Ruiz 6ee4074a4b first commit 2016-12-28 11:52:27 -08:00