Skip to content

Support "emcc/em++" config objects #4

@devappd

Description

@devappd

Curently, to run emcc/em++ directly, I expose the run() method which takes a cmd arguments array.

It would be nice to allow more semantic configuration for this, following the lead of gnucc

{
  input: 'src/head.cpp',
  output: 'out/head',
  includes: [
    'src/headers'
  ],
  binaries: {
    "gcc": 'gcc',
    "g++": 'g++'
  },
  optimisation: OPTIMISATION.HIGH,
  warning: [WARN.ALL]
}

Quick start

import { gnucc, gcc, gpp } from 'gnucc';
 
gnucc('file.cpp'); // compiles to executable
 
gnucc(input: string, output?: string, log?: boolean); // uses gcc or g++
gcc(input: string, ...); // uses gcc
gpp(input: string, ...); // uses g++

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions