Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ci/azp-linux-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ steps:
- { bash: "./.ci/b2_example.sh example/hello", displayName: "example/hello" }
- { bash: "./.ci/b2_example.sh example/libraries", displayName: "example/libraries" }
- { bash: "./.ci/b2_example.sh example/make", displayName: "example/make" }
- { bash: "./.ci/b2_example.sh example/icx", displayName: "example/icx" }
1 change: 1 addition & 0 deletions .ci/azp-linux-prep-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ steps:
target: host
inputs:
script: |
/usr/bin/docker pull intel/oneapi
/usr/bin/docker exec -t -u root container mv /etc/sudoers /etc/sudoers.bak
/usr/bin/docker exec -t -u root container apt-get -qq update
/usr/bin/docker exec -t -u root container apt-get -qq install sudo
Expand Down
15 changes: 15 additions & 0 deletions example/icx/hello.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) 2003 Vladimir Prus
// Copyright (c) 2026 Amlal El Mahrouss
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE.txt or copy at
// https://www.bfgroup.xyz/b2/LICENSE.txt)

// tag::source[]
#include <iostream>

int main()
{
std::cout << "Hello ICX!\n";
}
// end::source[]
6 changes: 6 additions & 0 deletions example/icx/jamroot.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using intel-linux : : icx ;

project : default-build <toolset>intel-linux ;

exe hello : hello.cpp :
<cxxflags>-ipo <linkflags>-ipo ;
51 changes: 51 additions & 0 deletions example/icx/readme.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
////
Copyright 2008 Jurko Gospodnetic
Copyright 2017 Rene Rivera
Copyright 2026 Amlal El Mahrouss
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
////

= Note

This is a specific example for the Intel C++ Compiler (icx) for testing purposes.

= Hello

This example shows a very basic Boost Build project set up so it compiles a
single executable from a single source file:

.`hello.cpp`
[source,cpp]
----
include::../../example/hello/hello.cpp[tag=source]
----

Our `jamroot.jam` is minimal and only specifies one `exe` target for the
program:

.`jamroot.jam`
[source,jam]
----
include::jamroot.jam[]
----

Building the example yields:

[source,bash]
----
> cd /example/hello
> b2
...found 8 targets...
...updating 4 targets...
common.mkdir bin/clang-darwin-4.2.1
common.mkdir bin/clang-darwin-4.2.1/debug
clang-darwin.compile.c++ bin/clang-darwin-4.2.1/debug/hello.o
clang-darwin.link bin/clang-darwin-4.2.1/debug/hello
...updated 4 targets...
> bin/clang-darwin-4.2.1/debug/hello
Hello!
----

NOTE: The actual paths in the `bin` sub-directory will depend on your
toolset.
6 changes: 3 additions & 3 deletions src/tools/intel-linux.jam
Original file line number Diff line number Diff line change
Expand Up @@ -195,23 +195,23 @@ rule init ( version ? : command * : options * )
flags intel-linux.compile OPTIONS $(condition)/<inlining>on : "-Ob1" ;
flags intel-linux.compile OPTIONS $(condition)/<inlining>full : "-Ob2" ;
flags intel-linux.compile OPTIONS $(condition)/<optimization>space : "-O1" ;
flags intel-linux.compile OPTIONS $(condition)/<optimization>speed : "-O3 -ip" ;
flags intel-linux.compile OPTIONS $(condition)/<optimization>speed : "-O3 -ipo" ;
}
else if [ numbers.less $(tool_version[1]) 11 ]
{
flags intel-linux.compile OPTIONS $(condition)/<inlining>off : "-inline-level=0" ;
flags intel-linux.compile OPTIONS $(condition)/<inlining>on : "-inline-level=1" ;
flags intel-linux.compile OPTIONS $(condition)/<inlining>full : "-inline-level=2" ;
flags intel-linux.compile OPTIONS $(condition)/<optimization>space : "-O1" ;
flags intel-linux.compile OPTIONS $(condition)/<optimization>speed : "-O3 -ip" ;
flags intel-linux.compile OPTIONS $(condition)/<optimization>speed : "-O3 -ipo" ;
}
else # newer version of intel do have -Os (at least 11+, don't know about 10)
{
flags intel-linux.compile OPTIONS $(condition)/<inlining>off : "-inline-level=0" ;
flags intel-linux.compile OPTIONS $(condition)/<inlining>on : "-inline-level=1" ;
flags intel-linux.compile OPTIONS $(condition)/<inlining>full : "-inline-level=2" ;
flags intel-linux.compile OPTIONS $(condition)/<optimization>space : "-Os" ;
flags intel-linux.compile OPTIONS $(condition)/<optimization>speed : "-O3 -ip" ;
flags intel-linux.compile OPTIONS $(condition)/<optimization>speed : "-O3 -ipo" ;
}
if [ numbers.less $(tool_version[1]) 2020 ]
{
Expand Down
Loading