Skip to content

Commit d92d51e

Browse files
authored
Merge pull request #243 from lf-lang/remove-compiler-flags
Removed the compiler-flags property
2 parents 0e0c425 + f44497b commit d92d51e

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

docs/reference/target-declaration.mdx

-22
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ For example:
128128
target C {
129129
cmake: false,
130130
compiler: "cc",
131-
flags: "-O3",
132131
fast: true,
133132
logging: log,
134133
timeout: 1 secs,
@@ -339,27 +338,6 @@ to point to your preferred compiler. Possible values are, for instance, `gcc`,
339338
</ShowIf>
340339
</ShowIfs>
341340

342-
## compiler-flags
343-
344-
<ShowIfs>
345-
<ShowIf cpp py ts rs>
346-
This target does not support the `compiler-flags` parameter.
347-
</ShowIf>
348-
<ShowIf c>
349-
This parameter is a list of strings giving additional arguments to pass to the target language compiler. For example:
350-
351-
```lf-c
352-
target C {
353-
compiler-flags: ["-g", "-I/usr/local/include", "-L/usr/local/lib", "-lpaho-mqtt3c"],
354-
};
355-
```
356-
357-
The `compiler-flags` option specifies to include debug information in the compiled code (`-g`); a directory to search for include files (`-I/usr/local/include`); a directory to search for library files (`-L/usr/local/lib`); a library to link with (`-lpaho-mqtt3c`, which will link with file `libpaho-mqtt3c.so`).
358-
359-
**Note**: Using the `compiler-flags` parameter is strongly discouraged, although supported. Flags are compiler-specific, and thus interfere with CMake's ability to find the most suitable compiler for each platform. In a similar fashion, we recommend against the use of the `compiler` standard parameter for the same reason. A better solution is to provide a `cmake-include` file.
360-
</ShowIf>
361-
</ShowIfs>
362-
363341
## docker
364342

365343
<ShowIfs>

0 commit comments

Comments
 (0)