Search code examples
hla

HLA compilation - can build directory be specified?


By default, compiling hla filename.hla builds an executable in the currently directory. Can a different directory be specified?


Solution

  • ENVIRONMENT

    • HLA (High Level Assembler - HLABE back end, LD linker) Version 2.16 build 4463 (prototype)
    • Ubuntu 20.10

    SOLUTION

    • This can be specified by using the option -x:name Executable output filename (does not append ".exe"). Found in the hla help, under the "Assembler and Linker Control" section.
    • To change the output directory consider -x:name to be -x:/path/to/name instead.

    EXAMPLE

    user@host:~/example$ ls
    src  bin
    user@host:~/example$ cd src
    user@host:~/example/src$ ls
    filename.hla
    user@host:~/example/src$ hla -x:../bin/filename.x filename.hla
    user@host:~/example/src$ ls
    src.hla  src.o
    user@host:~/example/src$ cd ../bin
    user@host:~/example/bin$ ls
    filename.x
    user@host:~/example/bin$