From d445f13926336864ccac660327ccbffab9544445 Mon Sep 17 00:00:00 2001 From: Magrid Date: Sun, 29 Oct 2023 20:19:57 +0100 Subject: [PATCH] dmd, ldc, gdc, dub: add page (#11321) * dmd: Add page * dmd: Update page * ldc: Add page * gdc: Add page * dub: Add page * ldc: Update page * Update dmd.md fix lint error * Update dub.md fix linter error * Update gdc.md fix linter error * Update ldc.md fix linter error * Update pages/linux/dub.md Co-authored-by: pixel * Update pages/linux/gdc.md Co-authored-by: pixel * Update dmd.md * dmd, dub, gdc, ldc: move to common Signed-off-by: K.B.Dharun Krishna * Update pages/common/dmd.md Co-authored-by: Juri Dispan * Update pages/common/dmd.md Co-authored-by: Juri Dispan * Update pages/common/dub.md Co-authored-by: Juri Dispan * Update pages/common/dub.md Co-authored-by: Juri Dispan * Update pages/common/dub.md Co-authored-by: Juri Dispan * Update pages/common/ldc.md Co-authored-by: Juri Dispan * Update pages/common/ldc.md Co-authored-by: Juri Dispan * Update pages/common/ldc.md Co-authored-by: Juri Dispan * Update pages/common/ldc.md Co-authored-by: Juri Dispan * Update pages/common/ldc.md Co-authored-by: Juri Dispan * Apply suggestions from code review Co-authored-by: Juri Dispan * dmd, dub, gdc, ldc: update pages Signed-off-by: K.B.Dharun Krishna * dub: fix typo Signed-off-by: K.B.Dharun Krishna --------- Signed-off-by: K.B.Dharun Krishna Co-authored-by: pixel Co-authored-by: K.B.Dharun Krishna Co-authored-by: Juri Dispan --- pages/common/dmd.md | 24 ++++++++++++++++++++++++ pages/common/dub.md | 28 ++++++++++++++++++++++++++++ pages/common/gdc.md | 24 ++++++++++++++++++++++++ pages/common/ldc.md | 24 ++++++++++++++++++++++++ 4 files changed, 100 insertions(+) create mode 100644 pages/common/dmd.md create mode 100644 pages/common/dub.md create mode 100644 pages/common/gdc.md create mode 100644 pages/common/ldc.md diff --git a/pages/common/dmd.md b/pages/common/dmd.md new file mode 100644 index 000000000..dc15f2e9d --- /dev/null +++ b/pages/common/dmd.md @@ -0,0 +1,24 @@ +# dmd + +> Official D compiler. +> More information: . + +- Build a D source file: + +`dmd {{path/to/source.d}}` + +- Generate code for all template instantiations: + +`dmd -allinst` + +- Control bounds checking: + +`dmd -boundscheck={{on|safeonly|off}}` + +- List information on all available checks: + +`dmd -check={{h|help|?}}` + +- Turn on colored console output: + +`dmd -color` diff --git a/pages/common/dub.md b/pages/common/dub.md new file mode 100644 index 000000000..ba8d11df5 --- /dev/null +++ b/pages/common/dub.md @@ -0,0 +1,28 @@ +# dub + +> Package manager for D packages. +> More information: . + +- Interactively create a new D project: + +`dub init {{project_name}}` + +- Non-interactively create a new D project: + +`dub init {{project_name}} -n` + +- Build and run a D project: + +`dub` + +- Install dependencies specified in a D project's `dub.json` or `dub.sdl` file: + +`dub fetch` + +- Update the dependencies in a D project: + +`dub upgrade` + +- Display help: + +`dub --help` diff --git a/pages/common/gdc.md b/pages/common/gdc.md new file mode 100644 index 000000000..806945fa0 --- /dev/null +++ b/pages/common/gdc.md @@ -0,0 +1,24 @@ +# gdc + +> D compiler using GCC as a backend. +> More information: . + +- Create an executable: + +`gdc {{path/to/source.d}} -o {{path/to/output_executable}}` + +- Print information about module dependencies: + +`gdc -fdeps` + +- Generate Ddoc documentation: + +`gdc -fdoc` + +- Generate D interface files: + +`gdc -fintfc` + +- Do not link the standard GCC libraries in the compilation: + +`gdc -nostdlib` diff --git a/pages/common/ldc.md b/pages/common/ldc.md new file mode 100644 index 000000000..1b820e950 --- /dev/null +++ b/pages/common/ldc.md @@ -0,0 +1,24 @@ +# ldc + +> D compiler using LLVM as a backend. +> More information: . + +- Compile a source code file into an executable binary: + +`ldc2 {{path/to/source.d}} -of={{path/to/output_executable}}` + +- Compile the source code file without linking: + +`ldc2 -c {{path/to/source.d}}` + +- Select the target architecture and OS: + +`ldc -mtriple={{architecture_OS}} -c {{path/to/source.d}}` + +- Display help: + +`ldc2 -h` + +- Display complete help: + +`ldc2 -help-hidden`