Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2017-04-26 06:36:49 +0300
committerJan Kotas <jkotas@microsoft.com>2017-04-26 06:36:49 +0300
commit165a55360055286c2cd0177b24ccbd9f7797c183 (patch)
tree3b7b08ae0149b5d0228de5a740a5581614488cc3 /dir.props
parente69c7e5a46de665f2251fe095c8724d9e3460c6b (diff)
Centralize build defines (#3431)
The way we were setting common defines (such as `AMD64`, `BIT64`, `ARM`) was extremely fragile and invited partial fixes such as #3414 and #3424. This really needs to be centralized.
Diffstat (limited to 'dir.props')
-rw-r--r--dir.props29
1 files changed, 29 insertions, 0 deletions
diff --git a/dir.props b/dir.props
index d4d734c61..041aae342 100644
--- a/dir.props
+++ b/dir.props
@@ -252,6 +252,35 @@
</Otherwise>
</Choose>
+ <!-- Set up various other constants -->
+ <PropertyGroup Condition="'$(IsProjectNLibrary)' != 'true'">
+ <DefineConstants>CORERT;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(TargetsWindows)'=='true'">
+ <DefineConstants>PLATFORM_WINDOWS;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(TargetsUnix)'=='true'">
+ <DefineConstants>PLATFORM_UNIX;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(TargetsOSX)'=='true'">
+ <DefineConstants>PLATFORM_OSX;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Platform)' == 'x64'">
+ <DefineConstants>AMD64;BIT64;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Platform)' == 'x86'">
+ <DefineConstants>X86;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Platform)' == 'arm'">
+ <DefineConstants>ARM;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Platform)' == 'armel'">
+ <DefineConstants>ARM;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Platform)' == 'arm64'">
+ <DefineConstants>ARM64;BIT64;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+
<PropertyGroup>
<PackageTargetFramework Condition="'$(PackageTargetFramework)' == ''">netcoreapp2.0</PackageTargetFramework>
<NuGetTargetMoniker Condition="'$(NuGetTargetFramework)' == ''">.NETCoreApp,Version=v2.0</NuGetTargetMoniker>