Skip to content
Merged
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
28 changes: 12 additions & 16 deletions qualcomm-software/docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,34 +68,30 @@ currently-enabled embedded variants.
> [build scripts](/qualcomm-software/scripts) for examples on how our toolchains are built and packaged
> on different hosts.

### Linux
The commands in the sections below assume you are in the `cpullvm-toolchain/qualcomm-software` directory.
### Configuring and building the toolchain

The toolchain can be built directly with CMake.
The commands in the sections below assume you are in the `cpullvm-toolchain/qualcomm-software` directory.

All dependencies are assumed to be present in your `PATH`.

First, populate the `CC` and `CXX` environment variables to tell CMake which toolchain to use:

Linux:
```
# Alternatively, CMAKE_C_COMPILER/CMAKE_CXX_COMPILER may be set directly
export CC=clang
export CXX=clang++
mkdir build
cd build
cmake .. -GNinja -DFETCHCONTENT_QUIET=OFF
ninja llvm-toolchain
```
Windows:
```
$env:CC = 'clang-cl'
$env:CXX = 'clang-cl'
```

### Windows
The commands in the sections below assume you are in the `cpullvm-toolchain/qualcomm-software` directory.

The toolchain can be built directly with CMake.

All dependencies are assumed to be present in your `PATH`.

Then, the toolchain can be configured directly with CMake and built:
```
mkdir build
cd build
cmake .. -GNinja -DFETCHCONTENT_QUIET=OFF -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
cmake .. -GNinja -DFETCHCONTENT_QUIET=OFF
ninja llvm-toolchain
```

Expand Down
7 changes: 4 additions & 3 deletions qualcomm-software/scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ Set-VS-Env
$repoRoot = git -C $PSScriptRoot rev-parse --show-toplevel
$buildDir = (Join-Path $repoRoot build)

$env:CC = 'clang-cl'
$env:CXX = 'clang-cl'

mkdir $buildDir
cd $buildDir

# Omit Linux runtimes, QEMU testing on Windows builds.
cmake ..\qualcomm-software `
-GNinja `
-DFETCHCONTENT_QUIET=OFF `
-DENABLE_QEMU_TESTING=OFF `
-DCMAKE_C_COMPILER=clang-cl `
-DCMAKE_CXX_COMPILER=clang-cl
-DENABLE_QEMU_TESTING=OFF

ninja package-llvm-toolchain
7 changes: 4 additions & 3 deletions qualcomm-software/scripts/build_copy_runtimes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Set-VS-Env
$repoRoot = git -C $PSScriptRoot rev-parse --show-toplevel
$buildDir = (Join-Path $repoRoot build)

$env:CC = 'clang-cl'
$env:CXX = 'clang-cl'

mkdir $buildDir -Force
cd $buildDir

Expand All @@ -30,8 +33,6 @@ cmake ..\qualcomm-software `
-GNinja `
-DFETCHCONTENT_QUIET=OFF `
-DPREBUILT_TARGET_LIBRARIES=ON `
-DENABLE_LINUX_LIBRARIES=ON `
-DCMAKE_C_COMPILER=clang-cl `
-DCMAKE_CXX_COMPILER=clang-cl
-DENABLE_LINUX_LIBRARIES=ON

ninja package-llvm-toolchain
Loading