Initial support for Target (cross-compiling)
This commit is contained in:
@@ -4,7 +4,11 @@ package Alire.Index.GNAT is
|
||||
("GNAT is a compiler for the Ada programming language");
|
||||
|
||||
Base : constant Release := Project.Unreleased
|
||||
(Properties => Path ("/usr/bin"));
|
||||
(Properties =>
|
||||
Path ("/usr/bin"),
|
||||
|
||||
Available_When =>
|
||||
Target = Native);
|
||||
|
||||
-- If minor versions proved important they could be segregated with platform-specific knowledge
|
||||
|
||||
|
||||
+5
-1
@@ -244,6 +244,7 @@ package Alire.Index is
|
||||
use all type Licensing.Licenses;
|
||||
use all type Platforms.Compilers;
|
||||
use all type Platforms.Operating_Systems;
|
||||
use all type Platforms.Targets;
|
||||
use all type Platforms.Versions;
|
||||
use all type Platforms.Word_Sizes;
|
||||
use all type Properties.Property'Class;
|
||||
@@ -328,11 +329,14 @@ package Alire.Index is
|
||||
use all type Requisites.Platform.Distributions.Comparable;
|
||||
|
||||
function Operating_System is new Requisites.Platform.Op_Systems.Factory;
|
||||
use all type Requisites.Platform.Op_Systems.Comparable;
|
||||
use all type Requisites.Platform.Op_Systems.Comparable;
|
||||
|
||||
function Distro_Release is new Requisites.Platform.Versions.Factory;
|
||||
use all type Requisites.Platform.Versions.Comparable;
|
||||
|
||||
function Target is new Requisites.Platform.Targets.Factory;
|
||||
use all type Requisites.Platform.Targets.Comparable;
|
||||
|
||||
function Word_Size is new Requisites.Platform.Word_Sizes.Factory;
|
||||
use all type Requisites.Platform.Word_Sizes.Comparable;
|
||||
|
||||
|
||||
@@ -18,6 +18,10 @@ package Alire.Platforms with Preelaborate is
|
||||
Windows,
|
||||
OS_Unknown);
|
||||
|
||||
type Targets is (Native,
|
||||
Unknown_Cross_Target);
|
||||
-- Minimal preparations for cross-compiling
|
||||
|
||||
type Distributions is (Debian,
|
||||
Ubuntu,
|
||||
Distro_Unknown);
|
||||
|
||||
@@ -13,6 +13,9 @@ package Alire.Properties.Platform with Preelaborate is
|
||||
package Operating_Systems is new Values (Platforms.Operating_Systems,
|
||||
Platforms.Operating_Systems'Image);
|
||||
|
||||
package Targets is new Values (Platforms.Targets,
|
||||
Platforms.Targets'Image);
|
||||
|
||||
package Versions is new Values (Platforms.Versions,
|
||||
Platforms.Versions'Image);
|
||||
|
||||
@@ -26,6 +29,8 @@ package Alire.Properties.Platform with Preelaborate is
|
||||
|
||||
function System_Is (OS : Platforms.Operating_Systems) return Vector renames Operating_Systems.New_Vector;
|
||||
|
||||
function Target_Is (T : Platforms.Targets) return Vector renames Targets.New_Vector;
|
||||
|
||||
function Version_Is (V : Platforms.Versions) return Vector renames Versions.New_Vector;
|
||||
|
||||
function Word_Size_Is (V : Platforms.Word_Sizes) return Vector renames Word_Sizes.New_Vector;
|
||||
|
||||
@@ -48,6 +48,12 @@ package Alire.Requisites.Platform with Preelaborate is
|
||||
package Distribution_Cases_Props is new Conditional.For_Properties.Case_Statements
|
||||
(Ps.Distributions, Distributions.Is_Equal_To);
|
||||
|
||||
package Targets is new Comparables
|
||||
(Ps.Targets, Ps."<", Ps.Targets'Image,
|
||||
PrPl.Targets.Property,
|
||||
PrPl.Targets.Element,
|
||||
"Target");
|
||||
|
||||
package Versions is new Comparables
|
||||
(Ps.Versions, Ps."<", Ps.Versions'Image,
|
||||
PrPl.Versions.Property,
|
||||
|
||||
Reference in New Issue
Block a user