SlideShare a Scribd company logo
Multi-language Programming
with GPRbuild
Vasiliy Fofanov
October 1, 2015
What is GNAT Project technology?
(representation)
• Project definition language
– What programming languages are used by project ?
– Where are the sources ?
– How are they called ?
– How to build them ?
• Toolchain definition database
– How to find and use toolchains and runtimes ?
– User-extensible
What is GNAT Project technology?
(operational)
• Project-aware tools
– GPR* family
• gprbuild
• gprclean
• gprinstall …
– Standard GNAT Pro tools
• gnatcheck
• gnatcoverage …
– IDEs (GPS and GNATbench)
• Project handling API
– To develop user tools…
GNAT Project File
• A text file describing the various properties of a project
• Declarative language (no actions)
– Intuitive Ada-inspired syntax
– Compact description even for a complex multi-language project
• Project files can be used to describe most industrial software
projects
– Multiple build scenarios and configurations
– Complex system architectures
• Shared, standalone libraries
– Multi-language (including user-defined)
A Simple Example
with "gtkada";
project My_Project is
for Source_Dirs use ("src1", "src2");
for Object_Dir use "obj";
for Main use ("file.adb");
type Mode is ("production", "debug");
M : Mode := external ("MODE", "debug");
package Compiler is
case M is
when "production" =>
for Default_Switches ("Ada") use ("-O2");
when "debug" =>
for Default_Switches ("Ada") use ("-O0", "-g", "-gnata");
end case;
end Compiler;
end My_Project;
Used everywhere!
• Common way to describe user software project across all AdaCore
toolchains
– Edit sources
– Analyze sources
– Build / cleanup …
• Common interface
$> gps –P my_project.gpr
$> gprbuild –P my_project.gpr -Xmode=debug
$> gnatmetric –P my_project.gpr
Project Hierarchies
• Modularity of software projects can be achieved through a
hierarchy of GNAT projects
• Highly recommended for medium and big projects
• The "with" keyword identifies project dependencies
with "gtkada";
with "../core";
project Prj is
end Prj;
Multi-Language Projects
• GNAT Projects are multi-language multi-compiler aware
– Supports a number of languages by default, including C and C++
• A project file is assumed to be Ada by default, but can declare your
own set via Languages attribute
• All languages are first class citizens
• Extensible
– Define your own languages/toolchains if needed
(binding generators, scripts, resource compilers, etc…)
for Languages use ("Ada", "C"); -- My sources are Ada and C
Multi-language Project Example
with "trig";
project My_App is
for Languages use ("C");
for Main use ("my_app.c");
end My_App;
#include <stdio.h>
float my_sin (float angle);
main ()
{ printf ("%fn", my_sin (3.1415/2.0)); }
package Trig is
function My_Sin (Angle : Float)
return Float;
pragma Export (C, My_Sin, "my_sin");
end Trig;
with Ada.Numerics.Generic_Elementary_Functions;
package body Trig is
package GEF is new
Ada.Numerics.Generic_Elementary_Functions (Float);
function My_Sin (Angle : Float) return Float is
begin
return GEF.Sin (Angle);
end My_Sin;
end Trig;
library project Trig is
for Library_Dir use "lib";
for Library_Kind use "dynamic";
for Library_Interface use ("trig");
for Library_Name use "trig”;
end Trig;
for Library_Standalone use "encapsulated";
$> gprbuild my_app.gpr
...
$> ./my_app
1.000000
That’s it!
Defining Targets and Runtimes
• Non-native target and specific runtimes can be specified
– In a project:
– On a command line:
for Target use "powerpc-elf";
for Runtime("Ada") use "ravenscar-cert";
$> gprbuild –P prj.gpr –-target=powerpc-elf --RTS=ravenscar-cert
GPRbuild
• Our multi-language builder
• Understands different languages, compilers and targets
• Takes care of all building steps and complex cases
– compiling, binding, linking
– shared libraries, encapsulated libraries …
• Can be extended to understand new toolchains
• Can distribute compilation over several computers ?
Distributed builder
• Parallel builds have been supported for a long time
gcc –c …gcc –c …gcc –c …gcc –c …
gprbuild prj.gpr –j0
• …but not good enough!
– At best a dozen cores or so
– But we can drive hundreds of
build decisions at once
– Solution: distributed build farm
Distributed builder (2)
• Communication and file sync by lightweight sockets-based protocols
Master machine
Slave machines
gprslave
gprslave
gprslave
gprslave
• sources
• compile commands
• objects
• availability state
$ gprbuild prj --distributed=
file://comp1.xyz.com,
164.10.127.4, ...
Where to find it all?
• Bundled with all GNAT compiler toolchains
• Also as a separate package
– If you want to keep the current compiler and only update the builder
• Soon on GitHub (~early 2016)
Use It!
• GNAT Project Facility is a mature technology
– Good match for AdaCore product line and our vision of
development process
– Should be powerful enough to replace most if not all custom
build procedures, while remaining accessible
• Are you using it? If not, why?
• Don’t hesitate to ask us for help!
Resources
• Online GPR documentation
http://docs.adacore.com/gprbuild-docs/html/gprbuild_ug.html

More Related Content

What's hot

Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Carlos Badenes-Olmedo
 
Why Python In Entertainment Industry?
Why Python In Entertainment Industry?Why Python In Entertainment Industry?
Why Python In Entertainment Industry?
Shuen-Huei Guan
 
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
Aljoscha Krettek
 
NAB 2019 Latest Technical and Business Progress with AV1
NAB 2019 Latest Technical and Business Progress with AV1NAB 2019 Latest Technical and Business Progress with AV1
NAB 2019 Latest Technical and Business Progress with AV1
Karan "Kay" Singh
 
GstTranscoder: A High Level API to Quickly Implement Transcoding Capabilities...
GstTranscoder: A High Level API to Quickly Implement Transcoding Capabilities...GstTranscoder: A High Level API to Quickly Implement Transcoding Capabilities...
GstTranscoder: A High Level API to Quickly Implement Transcoding Capabilities...
Igalia
 
MPL: modular pipeline library - Dynamic Talks Milwaukee 4/11/2019
MPL: modular pipeline library - Dynamic Talks Milwaukee 4/11/2019MPL: modular pipeline library - Dynamic Talks Milwaukee 4/11/2019
MPL: modular pipeline library - Dynamic Talks Milwaukee 4/11/2019
Grid Dynamics
 
gRPC with java
gRPC with javagRPC with java
gRPC with java
Knoldus Inc.
 
Swift should I switch?
Swift should I switch?Swift should I switch?
Swift should I switch?
wulfgeng
 
How does Netflix Get Built and Triumphed?
How does Netflix Get Built and Triumphed?How does Netflix Get Built and Triumphed?
How does Netflix Get Built and Triumphed?
Shuen-Huei Guan
 
Introduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IOIntroduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IO
Liran Zvibel
 
A basic overview of Containers
A basic overview of ContainersA basic overview of Containers
A basic overview of Containers
Divakar Sharma
 
How to debug machine learning call stacks
How to debug machine learning call stacksHow to debug machine learning call stacks
How to debug machine learning call stacks
Rogue Wave Software
 
Run Go applications on Pico using TinyGo
Run Go applications on Pico using TinyGo Run Go applications on Pico using TinyGo
Run Go applications on Pico using TinyGo
Yu-Shuan Hsieh
 
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
Jeff Squyres
 
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
tdc-globalcode
 
Timed Text At Netflix
Timed Text At NetflixTimed Text At Netflix
Timed Text At NetflixRohit Puri
 
DevOps from the Provider Perspective
DevOps from the Provider PerspectiveDevOps from the Provider Perspective
DevOps from the Provider Perspective
Pat Patterson
 
Netflix Architecture and Open Source
Netflix Architecture and Open SourceNetflix Architecture and Open Source
Netflix Architecture and Open Source
All Things Open
 
IL2CPP: Debugging and Profiling
IL2CPP: Debugging and ProfilingIL2CPP: Debugging and Profiling
IL2CPP: Debugging and Profiling
joncham
 

What's hot (20)

Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Why Python In Entertainment Industry?
Why Python In Entertainment Industry?Why Python In Entertainment Industry?
Why Python In Entertainment Industry?
 
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
 
NAB 2019 Latest Technical and Business Progress with AV1
NAB 2019 Latest Technical and Business Progress with AV1NAB 2019 Latest Technical and Business Progress with AV1
NAB 2019 Latest Technical and Business Progress with AV1
 
GstTranscoder: A High Level API to Quickly Implement Transcoding Capabilities...
GstTranscoder: A High Level API to Quickly Implement Transcoding Capabilities...GstTranscoder: A High Level API to Quickly Implement Transcoding Capabilities...
GstTranscoder: A High Level API to Quickly Implement Transcoding Capabilities...
 
MPL: modular pipeline library - Dynamic Talks Milwaukee 4/11/2019
MPL: modular pipeline library - Dynamic Talks Milwaukee 4/11/2019MPL: modular pipeline library - Dynamic Talks Milwaukee 4/11/2019
MPL: modular pipeline library - Dynamic Talks Milwaukee 4/11/2019
 
gRPC with java
gRPC with javagRPC with java
gRPC with java
 
Swift should I switch?
Swift should I switch?Swift should I switch?
Swift should I switch?
 
How does Netflix Get Built and Triumphed?
How does Netflix Get Built and Triumphed?How does Netflix Get Built and Triumphed?
How does Netflix Get Built and Triumphed?
 
Kshitij
KshitijKshitij
Kshitij
 
Introduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IOIntroduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IO
 
A basic overview of Containers
A basic overview of ContainersA basic overview of Containers
A basic overview of Containers
 
How to debug machine learning call stacks
How to debug machine learning call stacksHow to debug machine learning call stacks
How to debug machine learning call stacks
 
Run Go applications on Pico using TinyGo
Run Go applications on Pico using TinyGo Run Go applications on Pico using TinyGo
Run Go applications on Pico using TinyGo
 
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
 
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
 
Timed Text At Netflix
Timed Text At NetflixTimed Text At Netflix
Timed Text At Netflix
 
DevOps from the Provider Perspective
DevOps from the Provider PerspectiveDevOps from the Provider Perspective
DevOps from the Provider Perspective
 
Netflix Architecture and Open Source
Netflix Architecture and Open SourceNetflix Architecture and Open Source
Netflix Architecture and Open Source
 
IL2CPP: Debugging and Profiling
IL2CPP: Debugging and ProfilingIL2CPP: Debugging and Profiling
IL2CPP: Debugging and Profiling
 

Viewers also liked

S emb t1-introduction
S emb t1-introductionS emb t1-introduction
S emb t1-introductionJoão Moreira
 
An3906 serial to eth freescale
An3906   serial to eth freescaleAn3906   serial to eth freescale
An3906 serial to eth freescale
Fernando
 
Bolt mld1717 11100975
Bolt mld1717 11100975Bolt mld1717 11100975
Bolt mld1717 11100975
João Moreira
 
Introduction to the new MediaTek LinkIt™ Development Platform for RTOS
Introduction to the new MediaTek LinkIt™ Development Platform for RTOSIntroduction to the new MediaTek LinkIt™ Development Platform for RTOS
Introduction to the new MediaTek LinkIt™ Development Platform for RTOS
MediaTek Labs
 
Andrew_Liu_ARDrone
Andrew_Liu_ARDroneAndrew_Liu_ARDrone
Andrew_Liu_ARDroneAndrew Liu
 
Tech Days 2015: Ada 2012 and Spark Crazyflie and Railway Demo
Tech Days 2015: Ada 2012 and Spark Crazyflie and Railway DemoTech Days 2015: Ada 2012 and Spark Crazyflie and Railway Demo
Tech Days 2015: Ada 2012 and Spark Crazyflie and Railway Demo
AdaCore
 
TDC2016SP - Trilha Linux Embarcado
TDC2016SP - Trilha Linux EmbarcadoTDC2016SP - Trilha Linux Embarcado
TDC2016SP - Trilha Linux Embarcado
tdc-globalcode
 
Automatizando uma app Híbrida
Automatizando uma app HíbridaAutomatizando uma app Híbrida
Automatizando uma app Híbrida
Elias Nogueira
 
AWS re:Invent 2016: How Amazon is enabling the future of Automotive(ALX202)
AWS re:Invent 2016: How Amazon is enabling the future of Automotive(ALX202)AWS re:Invent 2016: How Amazon is enabling the future of Automotive(ALX202)
AWS re:Invent 2016: How Amazon is enabling the future of Automotive(ALX202)
Amazon Web Services
 
AWS re:Invent 2016: NEW LAUNCH! Introducing AWS Greengrass (IOT201)
AWS re:Invent 2016: NEW LAUNCH! Introducing AWS Greengrass (IOT201)AWS re:Invent 2016: NEW LAUNCH! Introducing AWS Greengrass (IOT201)
AWS re:Invent 2016: NEW LAUNCH! Introducing AWS Greengrass (IOT201)
Amazon Web Services
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
Leslie Samuel
 

Viewers also liked (12)

S emb t1-introduction
S emb t1-introductionS emb t1-introduction
S emb t1-introduction
 
An3906 serial to eth freescale
An3906   serial to eth freescaleAn3906   serial to eth freescale
An3906 serial to eth freescale
 
Bolt mld1717 11100975
Bolt mld1717 11100975Bolt mld1717 11100975
Bolt mld1717 11100975
 
Introduction to the new MediaTek LinkIt™ Development Platform for RTOS
Introduction to the new MediaTek LinkIt™ Development Platform for RTOSIntroduction to the new MediaTek LinkIt™ Development Platform for RTOS
Introduction to the new MediaTek LinkIt™ Development Platform for RTOS
 
Andrew_Liu_ARDrone
Andrew_Liu_ARDroneAndrew_Liu_ARDrone
Andrew_Liu_ARDrone
 
Tech Days 2015: Ada 2012 and Spark Crazyflie and Railway Demo
Tech Days 2015: Ada 2012 and Spark Crazyflie and Railway DemoTech Days 2015: Ada 2012 and Spark Crazyflie and Railway Demo
Tech Days 2015: Ada 2012 and Spark Crazyflie and Railway Demo
 
TDC2016SP - Trilha Linux Embarcado
TDC2016SP - Trilha Linux EmbarcadoTDC2016SP - Trilha Linux Embarcado
TDC2016SP - Trilha Linux Embarcado
 
S emb t13-freertos
S emb t13-freertosS emb t13-freertos
S emb t13-freertos
 
Automatizando uma app Híbrida
Automatizando uma app HíbridaAutomatizando uma app Híbrida
Automatizando uma app Híbrida
 
AWS re:Invent 2016: How Amazon is enabling the future of Automotive(ALX202)
AWS re:Invent 2016: How Amazon is enabling the future of Automotive(ALX202)AWS re:Invent 2016: How Amazon is enabling the future of Automotive(ALX202)
AWS re:Invent 2016: How Amazon is enabling the future of Automotive(ALX202)
 
AWS re:Invent 2016: NEW LAUNCH! Introducing AWS Greengrass (IOT201)
AWS re:Invent 2016: NEW LAUNCH! Introducing AWS Greengrass (IOT201)AWS re:Invent 2016: NEW LAUNCH! Introducing AWS Greengrass (IOT201)
AWS re:Invent 2016: NEW LAUNCH! Introducing AWS Greengrass (IOT201)
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

Similar to Tech Days 2015: Multi-language Programming with GPRbuild

Programming a CI/CD pipeline with Go: hands-on Dagger SDK
Programming a CI/CD pipeline with Go: hands-on Dagger SDKProgramming a CI/CD pipeline with Go: hands-on Dagger SDK
Programming a CI/CD pipeline with Go: hands-on Dagger SDK
Sergio Matone
 
MozillaPH Rust Hack & Learn Session 1
MozillaPH Rust Hack & Learn Session 1MozillaPH Rust Hack & Learn Session 1
MozillaPH Rust Hack & Learn Session 1
Robert 'Bob' Reyes
 
DevEx | there’s no place like k3s
DevEx | there’s no place like k3sDevEx | there’s no place like k3s
DevEx | there’s no place like k3s
Haggai Philip Zagury
 
gtkgst video in your widgets!
gtkgst video in your widgets!gtkgst video in your widgets!
gtkgst video in your widgets!
ystreet00
 
Embedded Rust
Embedded RustEmbedded Rust
Embedded Rust
Jens Siebert
 
Tech Days 2015: AdaCore Roadmap
Tech Days 2015: AdaCore RoadmapTech Days 2015: AdaCore Roadmap
Tech Days 2015: AdaCore Roadmap
AdaCore
 
Kubernetes
KubernetesKubernetes
Kubernetes
Dharmit Shah
 
Code, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers wayCode, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers way
Alex Baitov
 
LCU13: GPGPU on ARM Experience Report
LCU13: GPGPU on ARM Experience ReportLCU13: GPGPU on ARM Experience Report
LCU13: GPGPU on ARM Experience Report
Linaro
 
"The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono...
"The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono..."The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono...
"The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono...
Edge AI and Vision Alliance
 
LAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoTLAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoT
Linaro
 
Localization (l10n) - The Process
Localization (l10n) - The ProcessLocalization (l10n) - The Process
Localization (l10n) - The Process
Sundeep Anand
 
Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13Daker Fernandes
 
Build Low-Latency Applications in Rust on ScyllaDB
Build Low-Latency Applications in Rust on ScyllaDBBuild Low-Latency Applications in Rust on ScyllaDB
Build Low-Latency Applications in Rust on ScyllaDB
ScyllaDB
 
High-Performance Computing with C++
High-Performance Computing with C++High-Performance Computing with C++
High-Performance Computing with C++
JetBrains
 
The Ring programming language version 1.7 book - Part 6 of 196
The Ring programming language version 1.7 book - Part 6 of 196The Ring programming language version 1.7 book - Part 6 of 196
The Ring programming language version 1.7 book - Part 6 of 196
Mahmoud Samir Fayed
 
TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...
TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...
TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...chiportal
 
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
Igalia
 
Transpilers(Source-to-Source Compilers)
Transpilers(Source-to-Source Compilers)Transpilers(Source-to-Source Compilers)
Transpilers(Source-to-Source Compilers)
Shivang Bajaniya
 
Some wonderful Linux softwares for daily use
Some wonderful Linux softwares for daily useSome wonderful Linux softwares for daily use
Some wonderful Linux softwares for daily use
arun.arwachin
 

Similar to Tech Days 2015: Multi-language Programming with GPRbuild (20)

Programming a CI/CD pipeline with Go: hands-on Dagger SDK
Programming a CI/CD pipeline with Go: hands-on Dagger SDKProgramming a CI/CD pipeline with Go: hands-on Dagger SDK
Programming a CI/CD pipeline with Go: hands-on Dagger SDK
 
MozillaPH Rust Hack & Learn Session 1
MozillaPH Rust Hack & Learn Session 1MozillaPH Rust Hack & Learn Session 1
MozillaPH Rust Hack & Learn Session 1
 
DevEx | there’s no place like k3s
DevEx | there’s no place like k3sDevEx | there’s no place like k3s
DevEx | there’s no place like k3s
 
gtkgst video in your widgets!
gtkgst video in your widgets!gtkgst video in your widgets!
gtkgst video in your widgets!
 
Embedded Rust
Embedded RustEmbedded Rust
Embedded Rust
 
Tech Days 2015: AdaCore Roadmap
Tech Days 2015: AdaCore RoadmapTech Days 2015: AdaCore Roadmap
Tech Days 2015: AdaCore Roadmap
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Code, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers wayCode, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers way
 
LCU13: GPGPU on ARM Experience Report
LCU13: GPGPU on ARM Experience ReportLCU13: GPGPU on ARM Experience Report
LCU13: GPGPU on ARM Experience Report
 
"The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono...
"The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono..."The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono...
"The Vision API Maze: Options and Trade-offs," a Presentation from the Khrono...
 
LAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoTLAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoT
 
Localization (l10n) - The Process
Localization (l10n) - The ProcessLocalization (l10n) - The Process
Localization (l10n) - The Process
 
Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13
 
Build Low-Latency Applications in Rust on ScyllaDB
Build Low-Latency Applications in Rust on ScyllaDBBuild Low-Latency Applications in Rust on ScyllaDB
Build Low-Latency Applications in Rust on ScyllaDB
 
High-Performance Computing with C++
High-Performance Computing with C++High-Performance Computing with C++
High-Performance Computing with C++
 
The Ring programming language version 1.7 book - Part 6 of 196
The Ring programming language version 1.7 book - Part 6 of 196The Ring programming language version 1.7 book - Part 6 of 196
The Ring programming language version 1.7 book - Part 6 of 196
 
TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...
TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...
TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...
 
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
 
Transpilers(Source-to-Source Compilers)
Transpilers(Source-to-Source Compilers)Transpilers(Source-to-Source Compilers)
Transpilers(Source-to-Source Compilers)
 
Some wonderful Linux softwares for daily use
Some wonderful Linux softwares for daily useSome wonderful Linux softwares for daily use
Some wonderful Linux softwares for daily use
 

More from AdaCore

RCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standardsRCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standards
AdaCore
 
Have we a Human Ecosystem?
Have we a Human Ecosystem?Have we a Human Ecosystem?
Have we a Human Ecosystem?
AdaCore
 
Rust and the coming age of high integrity languages
Rust and the coming age of high integrity languagesRust and the coming age of high integrity languages
Rust and the coming age of high integrity languages
AdaCore
 
SPARKNaCl: A verified, fast cryptographic library
SPARKNaCl: A verified, fast cryptographic librarySPARKNaCl: A verified, fast cryptographic library
SPARKNaCl: A verified, fast cryptographic library
AdaCore
 
Developing Future High Integrity Processing Solutions
Developing Future High Integrity Processing SolutionsDeveloping Future High Integrity Processing Solutions
Developing Future High Integrity Processing Solutions
AdaCore
 
Taming event-driven software via formal verification
Taming event-driven software via formal verificationTaming event-driven software via formal verification
Taming event-driven software via formal verification
AdaCore
 
Pushing the Boundary of Mostly Automatic Program Proof
Pushing the Boundary of Mostly Automatic Program ProofPushing the Boundary of Mostly Automatic Program Proof
Pushing the Boundary of Mostly Automatic Program Proof
AdaCore
 
RCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standardsRCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standards
AdaCore
 
Product Lines and Ecosystems: from customization to configuration
Product Lines and Ecosystems: from customization to configurationProduct Lines and Ecosystems: from customization to configuration
Product Lines and Ecosystems: from customization to configuration
AdaCore
 
Securing the Future of Safety and Security of Embedded Software
Securing the Future of Safety and Security of Embedded SoftwareSecuring the Future of Safety and Security of Embedded Software
Securing the Future of Safety and Security of Embedded Software
AdaCore
 
Spark / Ada for Safe and Secure Firmware Development
Spark / Ada for Safe and Secure Firmware DevelopmentSpark / Ada for Safe and Secure Firmware Development
Spark / Ada for Safe and Secure Firmware Development
AdaCore
 
Introducing the HICLASS Research Programme - Enabling Development of Complex ...
Introducing the HICLASS Research Programme - Enabling Development of Complex ...Introducing the HICLASS Research Programme - Enabling Development of Complex ...
Introducing the HICLASS Research Programme - Enabling Development of Complex ...
AdaCore
 
The Future of Aerospace – More Software Please!
The Future of Aerospace – More Software Please!The Future of Aerospace – More Software Please!
The Future of Aerospace – More Software Please!
AdaCore
 
Adaptive AUTOSAR - The New AUTOSAR Architecture
Adaptive AUTOSAR - The New AUTOSAR ArchitectureAdaptive AUTOSAR - The New AUTOSAR Architecture
Adaptive AUTOSAR - The New AUTOSAR Architecture
AdaCore
 
Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...
Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...
Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...
AdaCore
 
Software Engineering for Robotics - The RoboStar Technology
Software Engineering for Robotics - The RoboStar TechnologySoftware Engineering for Robotics - The RoboStar Technology
Software Engineering for Robotics - The RoboStar Technology
AdaCore
 
MISRA C in an ISO 26262 context
MISRA C in an ISO 26262 contextMISRA C in an ISO 26262 context
MISRA C in an ISO 26262 context
AdaCore
 
Application of theorem proving for safety-critical vehicle software
Application of theorem proving for safety-critical vehicle softwareApplication of theorem proving for safety-critical vehicle software
Application of theorem proving for safety-critical vehicle software
AdaCore
 
The Application of Formal Methods to Railway Signalling Software
The Application of Formal Methods to Railway Signalling SoftwareThe Application of Formal Methods to Railway Signalling Software
The Application of Formal Methods to Railway Signalling Software
AdaCore
 
Bounded Model Checking for C Programs in an Enterprise Environment
Bounded Model Checking for C Programs in an Enterprise EnvironmentBounded Model Checking for C Programs in an Enterprise Environment
Bounded Model Checking for C Programs in an Enterprise Environment
AdaCore
 

More from AdaCore (20)

RCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standardsRCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standards
 
Have we a Human Ecosystem?
Have we a Human Ecosystem?Have we a Human Ecosystem?
Have we a Human Ecosystem?
 
Rust and the coming age of high integrity languages
Rust and the coming age of high integrity languagesRust and the coming age of high integrity languages
Rust and the coming age of high integrity languages
 
SPARKNaCl: A verified, fast cryptographic library
SPARKNaCl: A verified, fast cryptographic librarySPARKNaCl: A verified, fast cryptographic library
SPARKNaCl: A verified, fast cryptographic library
 
Developing Future High Integrity Processing Solutions
Developing Future High Integrity Processing SolutionsDeveloping Future High Integrity Processing Solutions
Developing Future High Integrity Processing Solutions
 
Taming event-driven software via formal verification
Taming event-driven software via formal verificationTaming event-driven software via formal verification
Taming event-driven software via formal verification
 
Pushing the Boundary of Mostly Automatic Program Proof
Pushing the Boundary of Mostly Automatic Program ProofPushing the Boundary of Mostly Automatic Program Proof
Pushing the Boundary of Mostly Automatic Program Proof
 
RCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standardsRCA OCORA: Safe Computing Platform using open standards
RCA OCORA: Safe Computing Platform using open standards
 
Product Lines and Ecosystems: from customization to configuration
Product Lines and Ecosystems: from customization to configurationProduct Lines and Ecosystems: from customization to configuration
Product Lines and Ecosystems: from customization to configuration
 
Securing the Future of Safety and Security of Embedded Software
Securing the Future of Safety and Security of Embedded SoftwareSecuring the Future of Safety and Security of Embedded Software
Securing the Future of Safety and Security of Embedded Software
 
Spark / Ada for Safe and Secure Firmware Development
Spark / Ada for Safe and Secure Firmware DevelopmentSpark / Ada for Safe and Secure Firmware Development
Spark / Ada for Safe and Secure Firmware Development
 
Introducing the HICLASS Research Programme - Enabling Development of Complex ...
Introducing the HICLASS Research Programme - Enabling Development of Complex ...Introducing the HICLASS Research Programme - Enabling Development of Complex ...
Introducing the HICLASS Research Programme - Enabling Development of Complex ...
 
The Future of Aerospace – More Software Please!
The Future of Aerospace – More Software Please!The Future of Aerospace – More Software Please!
The Future of Aerospace – More Software Please!
 
Adaptive AUTOSAR - The New AUTOSAR Architecture
Adaptive AUTOSAR - The New AUTOSAR ArchitectureAdaptive AUTOSAR - The New AUTOSAR Architecture
Adaptive AUTOSAR - The New AUTOSAR Architecture
 
Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...
Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...
Using Tiers of Assurance Evidence to Reduce the Tears! Adopting the “Wheel of...
 
Software Engineering for Robotics - The RoboStar Technology
Software Engineering for Robotics - The RoboStar TechnologySoftware Engineering for Robotics - The RoboStar Technology
Software Engineering for Robotics - The RoboStar Technology
 
MISRA C in an ISO 26262 context
MISRA C in an ISO 26262 contextMISRA C in an ISO 26262 context
MISRA C in an ISO 26262 context
 
Application of theorem proving for safety-critical vehicle software
Application of theorem proving for safety-critical vehicle softwareApplication of theorem proving for safety-critical vehicle software
Application of theorem proving for safety-critical vehicle software
 
The Application of Formal Methods to Railway Signalling Software
The Application of Formal Methods to Railway Signalling SoftwareThe Application of Formal Methods to Railway Signalling Software
The Application of Formal Methods to Railway Signalling Software
 
Bounded Model Checking for C Programs in an Enterprise Environment
Bounded Model Checking for C Programs in an Enterprise EnvironmentBounded Model Checking for C Programs in an Enterprise Environment
Bounded Model Checking for C Programs in an Enterprise Environment
 

Recently uploaded

Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
ISH Technologies
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 

Recently uploaded (20)

Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 

Tech Days 2015: Multi-language Programming with GPRbuild

  • 2. What is GNAT Project technology? (representation) • Project definition language – What programming languages are used by project ? – Where are the sources ? – How are they called ? – How to build them ? • Toolchain definition database – How to find and use toolchains and runtimes ? – User-extensible
  • 3. What is GNAT Project technology? (operational) • Project-aware tools – GPR* family • gprbuild • gprclean • gprinstall … – Standard GNAT Pro tools • gnatcheck • gnatcoverage … – IDEs (GPS and GNATbench) • Project handling API – To develop user tools…
  • 4. GNAT Project File • A text file describing the various properties of a project • Declarative language (no actions) – Intuitive Ada-inspired syntax – Compact description even for a complex multi-language project • Project files can be used to describe most industrial software projects – Multiple build scenarios and configurations – Complex system architectures • Shared, standalone libraries – Multi-language (including user-defined)
  • 5. A Simple Example with "gtkada"; project My_Project is for Source_Dirs use ("src1", "src2"); for Object_Dir use "obj"; for Main use ("file.adb"); type Mode is ("production", "debug"); M : Mode := external ("MODE", "debug"); package Compiler is case M is when "production" => for Default_Switches ("Ada") use ("-O2"); when "debug" => for Default_Switches ("Ada") use ("-O0", "-g", "-gnata"); end case; end Compiler; end My_Project;
  • 6. Used everywhere! • Common way to describe user software project across all AdaCore toolchains – Edit sources – Analyze sources – Build / cleanup … • Common interface $> gps –P my_project.gpr $> gprbuild –P my_project.gpr -Xmode=debug $> gnatmetric –P my_project.gpr
  • 7. Project Hierarchies • Modularity of software projects can be achieved through a hierarchy of GNAT projects • Highly recommended for medium and big projects • The "with" keyword identifies project dependencies with "gtkada"; with "../core"; project Prj is end Prj;
  • 8. Multi-Language Projects • GNAT Projects are multi-language multi-compiler aware – Supports a number of languages by default, including C and C++ • A project file is assumed to be Ada by default, but can declare your own set via Languages attribute • All languages are first class citizens • Extensible – Define your own languages/toolchains if needed (binding generators, scripts, resource compilers, etc…) for Languages use ("Ada", "C"); -- My sources are Ada and C
  • 9. Multi-language Project Example with "trig"; project My_App is for Languages use ("C"); for Main use ("my_app.c"); end My_App; #include <stdio.h> float my_sin (float angle); main () { printf ("%fn", my_sin (3.1415/2.0)); } package Trig is function My_Sin (Angle : Float) return Float; pragma Export (C, My_Sin, "my_sin"); end Trig; with Ada.Numerics.Generic_Elementary_Functions; package body Trig is package GEF is new Ada.Numerics.Generic_Elementary_Functions (Float); function My_Sin (Angle : Float) return Float is begin return GEF.Sin (Angle); end My_Sin; end Trig; library project Trig is for Library_Dir use "lib"; for Library_Kind use "dynamic"; for Library_Interface use ("trig"); for Library_Name use "trig”; end Trig; for Library_Standalone use "encapsulated"; $> gprbuild my_app.gpr ... $> ./my_app 1.000000 That’s it!
  • 10. Defining Targets and Runtimes • Non-native target and specific runtimes can be specified – In a project: – On a command line: for Target use "powerpc-elf"; for Runtime("Ada") use "ravenscar-cert"; $> gprbuild –P prj.gpr –-target=powerpc-elf --RTS=ravenscar-cert
  • 11. GPRbuild • Our multi-language builder • Understands different languages, compilers and targets • Takes care of all building steps and complex cases – compiling, binding, linking – shared libraries, encapsulated libraries … • Can be extended to understand new toolchains • Can distribute compilation over several computers ?
  • 12. Distributed builder • Parallel builds have been supported for a long time gcc –c …gcc –c …gcc –c …gcc –c … gprbuild prj.gpr –j0 • …but not good enough! – At best a dozen cores or so – But we can drive hundreds of build decisions at once – Solution: distributed build farm
  • 13. Distributed builder (2) • Communication and file sync by lightweight sockets-based protocols Master machine Slave machines gprslave gprslave gprslave gprslave • sources • compile commands • objects • availability state $ gprbuild prj --distributed= file://comp1.xyz.com, 164.10.127.4, ...
  • 14. Where to find it all? • Bundled with all GNAT compiler toolchains • Also as a separate package – If you want to keep the current compiler and only update the builder • Soon on GitHub (~early 2016)
  • 15. Use It! • GNAT Project Facility is a mature technology – Good match for AdaCore product line and our vision of development process – Should be powerful enough to replace most if not all custom build procedures, while remaining accessible • Are you using it? If not, why? • Don’t hesitate to ask us for help!
  • 16. Resources • Online GPR documentation http://docs.adacore.com/gprbuild-docs/html/gprbuild_ug.html

Editor's Notes

  1. This template can be used as a starter file for presenting training materials in a group setting. Sections Sections can help to organize your slides or facilitate collaboration between multiple authors. On the Home tab under Slides, click Section, and then click Add Section. Notes Use the Notes pane for delivery notes or to provide additional details for the audience. You can see these notes in Presenter View during your presentation. Keep in mind the font size (important for accessibility, visibility, videotaping, and online production) Coordinated colors Pay particular attention to the graphs, charts, and text boxes. Consider that attendees will print in black and white or grayscale. Run a test print to make sure your colors work when printed in pure black and white and grayscale. Graphics, tables, and graphs Keep it simple: If possible, use consistent, non-distracting styles and colors. Label all graphs and tables.
  2. Project definition language Describes where the sources of the software project are located, how are they called, how to build them Toolchain definition database Describes how to detect the presence of known toolchains and runtimes and how they should be invoked and used User-extensible Used by gprconfig tool to set up the execution environment Project-aware tools GPR* family gprbuild Gprclean gprinstall Standard GNAT Pro toolchain components AdaCore IDEs (GPS and GNATbench) Official project handling API GNATCOLL.Projects Allows developing user project-aware tools
  3. Project definition language Describes where the sources of the software project are located, how are they called, how to build them Toolchain definition database Describes how to detect the presence of known toolchains and runtimes and how they should be invoked and used User-extensible Used by gprconfig tool to set up the execution environment Project-aware tools GPR* family gprbuild Gprclean gprinstall Standard GNAT Pro toolchain components AdaCore IDEs (GPS and GNATbench) Official project handling API GNATCOLL.Projects Allows developing user project-aware tools
  4. Microsoft Confidential