Skip to content

Configuration

Matt Windsor edited this page Dec 30, 2018 · 5 revisions

act needs some configuration to work properly. It looks for a config file called act.conf in the current working directory (or, if you provide -config FILENAME, that path instead). This page describes that file.

Note: each act subcommand also takes various command-line arguments; see each subcommand's documentation, and the standard flags, for details.

The example file

act's source distribution contains a documented example file at bin/act.conf.example.

General syntax

  • The configuration file consists of multiple items, each of which is either a line of configuration or a brace-delimited, named block.
  • Each configuration line consists of a run of multiple keywords and arguments (the exact syntax depends on the line, but usually starts with one or more keywords). Arguments, at time of writing, can be identifiers (dot-separated, mostly-alphanumeric unquoted strings) or string literals (double-quoted).
  • # is the comment character, and discards up to the end of the line.
  • Lines containing only whitespace/comments are ignored.

Blocks

Main configuration

machine: set up a machine

The machine ID { ... } block tells act about a machine on which it can run compilers.

Example
machine example {
  enabled off
  via ssh {
    host "example.com"
    user "johndoe"
    copy to "/home/johndoe/actscratch"
  }
}

compiler: set up a compiler

The compiler ID { ... } block tells act about a compiler it can use. act uses compiler blocks both for running compiler tests, and also to compile single files in other modes.

Example
compiler gcc.x86 {
  enabled on
  style gcc
  emits x86.att
  cmd "gcc"
  argv "-m32" "-DNO_PTHREADS"
  herd on
  machine default
}

Helper programs

cpp: configure the C preprocessor

The cpp { ... } block tells act how to run the C preprocessor. act uses the C preprocessor whenever it needs to read a (non-Litmus) C program.

Example
cpp {
  enabled on
  cmd "cpp"
}

herd: configure the Herd memory model simulator

The herd { ... } block tells herd how to run the Herd memory model simulator. act uses Herd in test mode to compare C program state sets with their compiled assembly equivalents.

Example
herd {
  cmd "herd7"
  c_model "c11_lahav.cat"
  asm_model x86.att   "x86_example.cat"
  asm_model x86.intel "x86_example.cat"
}
Clone this wiki locally