Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Is it normal that fastcomp on linux takes ~6GB? #6

Closed
@trzecieu

Description

@trzecieu

Hi, I'm trying to prepare a Docker image with Emscripten (based on Ubuntu 15.10) and it works fine except image size what is huge. Major chunk of image is consumed by clang. There is an output.

root@98096b18fc46:/emsdk_portable/clang/tag-e1.35.0/build_tag-e1.35.0_32/bin# ls -laSh && du -sh
total 4.6G
-rwxr-xr-x  1 root root 833M Dec  2 16:23 clang-3.7
-rwxr-xr-x  1 root root 415M Dec  2 16:23 clang-check
-rwxr-xr-x  1 root root 339M Dec  2 16:24 opt
-rwxr-xr-x  1 root root 307M Dec  2 16:22 arcmt-test
-rwxr-xr-x  1 root root 278M Dec  2 16:21 llvm-lto
-rwxr-xr-x  1 root root 264M Dec  2 16:17 diagtool
-rwxr-xr-x  1 root root 233M Dec  2 16:20 lli
-rwxr-xr-x  1 root root 230M Dec  2 16:24 llc
-rwxr-xr-x  1 root root 218M Dec  2 16:21 llvm-dsymutil
-rwxr-xr-x  1 root root 216M Dec  2 16:21 bugpoint
-rwxr-xr-x  1 root root 202M Dec  2 16:21 llvm-c-test
-rwxr-xr-x  1 root root 100M Dec  2 16:20 llvm-objdump
-rwxr-xr-x  1 root root  95M Dec  2 16:23 llvm-mc
-rwxr-xr-x  1 root root  92M Dec  2 16:24 llvm-nm
-rwxr-xr-x  1 root root  92M Dec  2 16:24 llvm-ar
-rwxr-xr-x  1 root root  56M Dec  2 16:21 llvm-rtdyld
-rwxr-xr-x  1 root root  49M Dec  2 16:20 llvm-extract
-rwxr-xr-x  1 root root  43M Dec  2 16:17 llvm-cov
-rwxr-xr-x  1 root root  42M Dec  2 16:17 llvm-symbolizer
-rwxr-xr-x  1 root root  42M Dec  2 16:20 llvm-link
-rwxr-xr-x  1 root root  42M Dec  2 16:21 llvm-readobj
-rwxr-xr-x  1 root root  41M Dec  2 16:21 verify-uselistorder
-rwxr-xr-x  1 root root  41M Dec  2 16:17 obj2yaml
-rwxr-xr-x  1 root root  40M Dec  2 16:17 llvm-dwarfdump
-rwxr-xr-x  1 root root  39M Dec  2 16:21 llvm-cxxdump
-rwxr-xr-x  1 root root  38M Dec  2 16:16 llvm-size
-rwxr-xr-x  1 root root  38M Dec  2 16:17 macho-dump
-rwxr-xr-x  1 root root  37M Dec  2 16:20 llvm-diff
-rwxr-xr-x  1 root root  36M Dec  2 16:16 llvm-as
-rwxr-xr-x  1 root root  36M Dec  2 15:55 llvm-tblgen
-rwxr-xr-x  1 root root  32M Dec  2 16:20 llvm-dis
-rwxr-xr-x  1 root root  30M Dec  2 16:21 llvm-stress
-rwxr-xr-x  1 root root  30M Dec  2 16:17 clang-format
-rwxr-xr-x  1 root root  24M Dec  2 16:17 llvm-profdata
-rwxr-xr-x  1 root root  13M Dec  2 15:55 clang-tblgen
-rwxr-xr-x  1 root root 7.7M Dec  2 16:17 yaml2obj
-rwxr-xr-x  1 root root 7.2M Dec  2 15:54 llvm-pdbdump
-rwxr-xr-x  1 root root 5.0M Dec  2 15:54 yaml-bench
-rwxr-xr-x  1 root root 4.8M Dec  2 15:54 FileCheck
-rwxr-xr-x  1 root root 4.6M Dec  2 16:17 llvm-bcanalyzer
-rwxr-xr-x  1 root root 4.1M Dec  2 15:54 llvm-mcmarkup
-rwxr-xr-x  1 root root 2.7M Dec  2 15:54 llvm-config
-rwxr-xr-x  1 root root 2.2M Dec  2 15:54 lli-child-target
-rwxr-xr-x  1 root root 2.1M Dec  2 15:54 not
-rwxr-xr-x  1 root root 324K Dec  2 16:24 c-index-test
-rwxr-xr-x  1 root root 101K Dec  2 15:54 llvm-PerfectShuffle
-rwxr-xr-x  1 root root  22K Dec  2 16:24 c-arcmt-test
-rwxr-xr-x  1 root root  14K Dec  2 15:54 count
drwxr-xr-x  2 root root 4.0K Dec  2 16:24 .
drwxr-xr-x 16 root root 4.0K Dec  7 08:55 ..
-rwxrwxr-x  1 root root 1.7K Dec  2 15:52 llvm-lit
lrwxrwxrwx  1 root root    9 Dec  2 16:23 clang -> clang-3.7
lrwxrwxrwx  1 root root    7 Dec  2 16:24 llvm-ranlib -> llvm-ar
lrwxrwxrwx  1 root root    5 Dec  2 16:23 clang++ -> clang
lrwxrwxrwx  1 root root    5 Dec  2 16:23 clang-cl -> clang

Question is: Can we do something with compilation flags that in default it will produce size optimized clang binary files?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions