Skip to content

Commit

Permalink
[nix] fix multiple main in omreader
Browse files Browse the repository at this point in the history
Signed-off-by: Avimitin <[email protected]>
  • Loading branch information
Avimitin authored and sequencer committed Oct 16, 2024
1 parent ae1c0d0 commit 241aab1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 9 additions & 3 deletions nix/t1/mill-modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,17 @@ let
mv out/t1package/assembly.dest/out.jar $t1package/share/java/t1package.jar
mv out/t1package/chiselPluginJar.dest/out.jar $t1package/share/java/chiselPluginJar.jar
mkdir -p $omreader/bin $elaborator/bin
mkdir -p $elaborator/bin
makeWrapper ${jdk21}/bin/java $elaborator/bin/elaborator \
--add-flags "--enable-preview -Djava.library.path=${circt-full}/lib -cp $out/share/java/elaborator.jar"
--add-flags "--enable-preview -Djava.library.path=${circt-full}/lib" \
--add-flags "-cp $out/share/java/elaborator.jar"
mkdir -p $omreader/bin
makeWrapper ${jdk21}/bin/java "$omreader"/bin/omreader \
--add-flags "--enable-preview --enable-native-access=ALL-UNNAMED -Djava.library.path=${circt-full}/lib -jar $out/share/java/omreader.jar"
--add-flags "--enable-preview" \
--add-flags "--enable-native-access=ALL-UNNAMED" \
--add-flags "-Djava.library.path=${circt-full}/lib" \
--add-flags "-cp $out/share/java/omreader.jar"
'';
};
in
Expand Down
3 changes: 2 additions & 1 deletion nix/t1/t1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@ lib.mapAttrs

omGet = args: lib.toLower (lib.fileContents (runCommand "get-${args}" { } ''
${t1Scope.omreader-unwrapped}/bin/omreader \
${lib.replaceStrings ["elaborator"] ["omreader"] generator.fullClassName} \
${args} \
--mlirbc-file ${innerMostScope.lowered-mlirbc}/${innerMostScope.lowered-mlirbc.name} \
> $out
''));
rtlDesignMetadata = with innerMostScope; rec {
march = omGet "march";
extensions = builtins.fromJSON (omGet "extensionsJson");
extensions = lib.strings.split "_" (omGet "extensions");
vlen = omGet "vlen";
dlen = omGet "dlen";
xlen = if (lib.hasPrefix "rv32" march) then 32 else 64;
Expand Down

0 comments on commit 241aab1

Please sign in to comment.