← 返回命令列表

Linux command

blaise 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Compile a single

blaise --source [Hello.pas] --output [Hello]

Compile a project

blaise --project [project.xml] --output [myapp]

Compile in

blaise --project [project.xml] --config [debug] --output [myapp]

Emit QBE intermediate representation

blaise --source [Hello.pas] --emit-ir

Show

blaise --version

说明

Blaise is a modern, self-hosting Object Pascal compiler written from scratch with no dependency on Free Pascal or Delphi sources. It targets native code through the QBE backend (with an LLVM backend in development) and is named after Blaise Pascal, the mathematician for whom the original Pascal language is also named. The language Blaise compiles is a "Pascal for the 2020s": a single language mode (no separate Delphi/Free Pascal/Turbo dialects), a single string type using UTF-8 internally, Automatic Reference Counting instead of manual memory management, reified generics, and zero-GUID interfaces. The toolchain ships its own debug format (OPDF) for first-class debugger support. Two invocation styles are supported. --source compiles a single file in the spirit of fpc hello.pas and is most useful for tutorials and one-off programs. --project reads a structured XML project file describing units, search paths, library dependencies and build profiles, which is the recommended workflow for non-trivial applications. Blaise bootstraps itself: the published binary is produced by the previous version of the compiler compiling its own sources, and the project tracks byte-for-byte exact rebuild as a correctness invariant.

参数

--source _FILE_
Compile a single Pascal source _FILE_.
--output _FILE_
Path of the output executable. Defaults to the source's basename when omitted.
--project _FILE_
Read build settings (units, search paths, libraries, defines) from _FILE_ — typically project.xml.
--config _PROFILE_
Select a build profile defined inside the project file. Common values are debug and release.
--emit-ir
Stop after emitting QBE intermediate representation; useful for inspecting code generation.
--version
Print the compiler version and exit.
--help
Show usage information and exit.

FAQ

What is the blaise command used for?

Blaise is a modern, self-hosting Object Pascal compiler written from scratch with no dependency on Free Pascal or Delphi sources. It targets native code through the QBE backend (with an LLVM backend in development) and is named after Blaise Pascal, the mathematician for whom the original Pascal language is also named. The language Blaise compiles is a "Pascal for the 2020s": a single language mode (no separate Delphi/Free Pascal/Turbo dialects), a single string type using UTF-8 internally, Automatic Reference Counting instead of manual memory management, reified generics, and zero-GUID interfaces. The toolchain ships its own debug format (OPDF) for first-class debugger support. Two invocation styles are supported. --source compiles a single file in the spirit of fpc hello.pas and is most useful for tutorials and one-off programs. --project reads a structured XML project file describing units, search paths, library dependencies and build profiles, which is the recommended workflow for non-trivial applications. Blaise bootstraps itself: the published binary is produced by the previous version of the compiler compiling its own sources, and the project tracks byte-for-byte exact rebuild as a correctness invariant.

How do I run a basic blaise example?

Run `blaise --source [Hello.pas] --output [Hello]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --source _FILE_ do in blaise?

Compile a single Pascal source _FILE_.