diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-04-25 08:51:12 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-25 08:51:12 -0400 |
| commit | c84e7c0fa526de51f380227a6667f723af36aea2 (patch) | |
| tree | 755c034fab30a2d0dfe7f8f6027d892b46d19f87 /docs | |
| parent | 1004f50bd7d0032411a564ad4625055e982902ea (diff) | |
Fixed building on CygWin with clang gcc (#953)
* * Make Path:: use lowerCamel method names as per coding standard
* Small improvements to make closer to standard
* GetDirectoryName -> getParentDirectory - previous method name's action was somewhat unclear, hopefully this is better
* * Can build on clang and gcc on CygWin
* Fix problem on cygwin loading shared libraries
* Renamed Path::isRelative to ::hasRelativeElement because isRelative implies the path is 'relative to the current path' and which isn't quite what it does
* Documented how to build for CygWin
* * Fix small bug creating platform shared library name.
* Small typo fixes in building.md
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/building.md | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/docs/building.md b/docs/building.md index 32e4a1156..c4b8fc521 100644 --- a/docs/building.md +++ b/docs/building.md @@ -15,9 +15,11 @@ If you are on Windows, then open `slang.sln` and build your desired platform/con The Visual Studio solution in the project is actually just generated using [`premake5`](https://premake.github.io/). See instructions in premake section below for further explanation. -## Linux +## Other Targets -For building on Linux it is first necessary to generate the `Makefile` for the project - we use [`premake5`](https://premake.github.io/) as the tool used for generating projects from the premake5.lua script found in the root of the project. The section below describes how to use premake on Linux. +Slang uses [`premake5`](https://premake.github.io/) to generate projects (such as `Makefile`s) that can then be used to build Slang binaries from source. + +For Linux and other targets the section below on `premake` describes the process. ## Premake @@ -70,6 +72,18 @@ To actually build using make use one of the following % make config=debug_aarch64 ``` +### CygWin + +Note that Cygwin isn't an official target. + +One issue with building on CygWin, is that there isn't a binary version of `premake` currently available. It may be possible to make this work by building `premake` from source, and then just doing `premake5 gmake`. Here we use another approach - using the windows `premake` to create a cygwin project. To do this use the command line... + +``` +% premake5 --target-detail=cygwin gmake +``` + +If you want to specify the toolset use `--cc=gcc` or `--cc=clang` on the command line. To check what compiler is being used/command line options you can add `verbose=1` to `make` command line. + ## Testing When slang is built from source it also builds tools to be able to test the Slang compiler. Testing is achieved using the `slang-test` tool. The binaries are placed in the appropriate directory underneath `bin`. To run the tests on a release x64 build from the command line, in the root directory of slang source tree you can use... |
